xAI
Bundles 包含支援特定第三方整合的自訂Components,與 AgentBuilder 搭配使用。
此頁面描述 xAI bundle 中可用的Components。
如需 xAI 功能和 xAI Components所使用功能的詳細資訊,請參閱 xAI 文件。
xAI 文字生成
xAI Components使用 xAI 模型(如 Grok)生成文字。
它可以輸出 Model Response(Message)或 Language Model(LanguageModel)。
當您想要將 xAI 模型用作另一個 LLM 驅動Components的 LLM 時,請使用 Language Model 輸出,例如 Agent 或 Smart Function Components。
如需詳細資訊,請參閱語言模型Components。
xAI 文字生成參數
某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。
| Name | Type | Description |
|---|---|---|
| max_tokens | Integer | 輸入參數。要生成的最大權杖數。設定為 0 表示無限制。範圍:0-128000。 |
| model_kwargs | Dictionary | 輸入參數。模型的額外關鍵字引數。 |
| json_mode | Boolean | 輸入參數。如果為 true,無論是否傳遞結構描述都會輸出 JSON。 |
| model_name | String | 輸入參數。要使用的 xAI 模型。預設:grok-2-latest。 |
| base_url | String | 輸入參數。API 請求的基礎 URL。預設:https://api.x.ai/v1。 |
| api_key | SecretString | 輸入參數。您的 xAI API 金鑰,用於驗證。 |
| temperature | Float | 輸入參數。控制輸出中的隨機性。範圍:[0.0, 2.0]。預設:0.1。 |
| seed | Integer | 輸入參數。控制工作的可重現性。 |