From d143fe49397245da6e84f2597a188f2e4b41cb91 Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:34:49 -0500 Subject: [PATCH] docs: add-xai-component (#6714) * add-xai-component * docs: update xAI component documentation with Grok link --- docs/docs/Components/components-models.md | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/docs/Components/components-models.md b/docs/docs/Components/components-models.md index dfdf69705..f1943ded4 100644 --- a/docs/docs/Components/components-models.md +++ b/docs/docs/Components/components-models.md @@ -496,4 +496,29 @@ For more information, see [Google Vertex AI documentation](https://cloud.google. |--------|---------------|-----------------------------------------------------| | model | LanguageModel | An instance of ChatVertexAI configured with the specified parameters. | +## xAI + +This component generates text using xAI models like [Grok](https://x.ai/grok). + +For more information, see the [xAI documentation](https://x.ai/). + +### Inputs + +| Name | Type | Description | +|----------------|---------------|-----------------------------------------------------------------| +| max_tokens | Integer | Maximum number of tokens to generate. Set to `0` for unlimited. Range: `0-128000`. | +| model_kwargs | Dictionary | Additional keyword arguments for the model. | +| json_mode | Boolean | If `True`, outputs JSON regardless of passing a schema. | +| model_name | String | The xAI model to use. Default: `grok-2-latest`. | +| base_url | String | Base URL for API requests. Default: `https://api.x.ai/v1`. | +| api_key | SecretString | Your xAI API key for authentication. | +| temperature | Float | Controls randomness in the output. Range: `[0.0, 2.0]`. Default: `0.1`. | +| seed | Integer | Controls reproducibility of the job. | + +### Outputs + +| Name | Type | Description | +|-------|---------------|------------------------------------------------------------------| +| model | LanguageModel | An instance of ChatOpenAI configured with the specified parameters. | +