Skip to content

Commit 29e0179

Browse files
authored
docs: groq model example (#7643)
* grok-model-example * spelling * spelling * tool-mode-enabled
1 parent 057108a commit 29e0179

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

docs/docs/Components/components-models.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Models
33
slug: /components-models
44
---
55

6+
import Icon from "@site/src/components/icon";
7+
68
# Model components in Langflow
79

810
Model components generate text using large language models.
@@ -190,18 +192,35 @@ For more information, see the [Google Generative AI documentation](https://cloud
190192

191193
This component generates text using Groq's language models.
192194

195+
1. To use this component in a flow, connect it as a **Model** in a flow like the [Basic prompting flow](/starter-projects-basic-prompting), or select it as the **Model Provider** if you're using an **Agent** component.
196+
197+
![Groq component in a basic prompting flow](/img/component-groq.png)
198+
199+
2. In the **Groq API Key** field, paste your Groq API key.
200+
The Groq model component automatically retrieves a list of the latest models.
201+
To refresh your list of models, click <Icon name="RefreshCw" aria-label="Refresh"/>.
202+
3. In the **Model** field, select the model you want to use for your LLM.
203+
This example uses [llama-3.1-8b-instant](https://console.groq.com/docs/model/llama-3.1-8b-instant), which Groq recommends for real-time conversational interfaces.
204+
4. In the **Prompt** component, enter:
205+
```text
206+
You are a helpful assistant who supports their claims with sources.
207+
```
208+
5. Click **Playground** and ask your Groq LLM a question.
209+
The responses include a list of sources.
210+
193211
For more information, see the [Groq documentation](https://groq.com/).
194212

195213
### Inputs
196214

197215
| Name | Type | Description |
198216
|----------------|---------------|-----------------------------------------------------------------|
199217
| groq_api_key | SecretString | API key for the Groq API. |
200-
| groq_api_base | String | Base URL path for API requests. Default: `https://api.groq.com` (advanced). |
201-
| max_tokens | Integer | The maximum number of tokens to generate (advanced). |
218+
| groq_api_base | String | Base URL path for API requests. Default: `https://api.groq.com`. |
219+
| max_tokens | Integer | The maximum number of tokens to generate. |
202220
| temperature | Float | Controls randomness in the output. Range: `[0.0, 1.0]`. Default: `0.1`. |
203-
| n | Integer | Number of chat completions to generate for each prompt (advanced). |
221+
| n | Integer | Number of chat completions to generate for each prompt. |
204222
| model_name | String | The name of the Groq model to use. Options are dynamically fetched from the Groq API. |
223+
| tool_mode_enabled | Bool | If enabled, the component only displays models that work with tools. |
205224

206225
### Outputs
207226

docs/static/img/component-groq.png

276 KB
Loading

0 commit comments

Comments
 (0)