-
Notifications
You must be signed in to change notification settings - Fork 8.3k
docs: global model provider feature #11231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: docs-1.8-release
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
…low-ai/langflow into docs-global-model-provider
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Build successful! ✅ |
deon-sanchez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im gonna approve so youre not blocked, but i need to confirm with design about the final implementation of this feature, as noted in the comments we will be making some minor updates (hopefully wont have too much impact on what weve already built).
|
|
||
| To configure your model providers globally, do the following: | ||
|
|
||
| 1. To open the **Model providers** pane, click <Icon name="BrainCog" aria-hidden="true" /> **Models** in the Langflow header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to confirm with design, but i think we are removing the header model button and moving it back to the settings page.
| For example, if you are using the **Language Model** core component, you could try an Anthropic model. | ||
|
|
||
| To switch models: | ||
| 1. To open the **Model providers** pane, click <Icon name="BrainCog" aria-hidden="true" /> **Models** in the Langflow header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to talk to design but this might be moved to the settings page
|
|
||
| * **Connect other models**: Connect a custom language model component to use models that aren't available in the global model providers list. | ||
| * **Manage Model Providers** <Icon name="Settings" aria-hidden="true" />: Opens the **Model providers** pane where you can configure API keys and enable or disable models. | ||
| * **Refresh List**: Refreshes the current list of available models. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we will probably remove this, since we have dynamic refreshing after adding an api key.
aimurphy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry this took a while. I think there are some opportunities to streamline the wording.
| 3. In the **API Key** field, add your provider's API key. | ||
| 4. Toggle on the specific models you want to enable from the list of available models for that provider. | ||
| Models are grouped into **LLM Models** and **Embedding Models** sections. | ||
| If a provider doesn't have any language models available, they aren't listed in the Agent component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this supposed to specify "Agent component"?
| * Set **Model Provider** to **Connect other models**, and then connect any [language model component](/components-models). | ||
| * Select your preferred provider, type the complete model name into the **Model Name** field, and then select your custom option from the **Model Name** menu. | ||
| Make sure that the model is enabled/verified in your model provider account. | ||
| To use a model with the **Agent** component, select the configured model from the **Agent** component's **Language Model** dropdown. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To use a model with the **Agent** component, select the configured model from the **Agent** component's **Language Model** dropdown. | |
| To use a model with the **Agent** component, select the model in the **Agent** component's **Language Model** field. |
| To use a model with the **Agent** component, select the configured model from the **Agent** component's **Language Model** dropdown. | ||
|
|
||
| If you need to generate embeddings in your flow, use an [embedding model component](/components-embedding-models). | ||
| The **Agent** component displays all language models that you've configured globally. If a provider doesn't have any language models available, they won't be listed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The **Agent** component displays all language models that you've configured globally. If a provider doesn't have any language models available, they won't be listed. | |
| The **Language Model** field lists all language models that you've configured globally. If a provider doesn't have any language models available, they aren't listed. | |
| For example, if a provider offers only embeddings models, those models aren't listed on the **Agent** component. |
| You can enter the API key directly or use a <Icon name="Globe" aria-hidden="true"/> [global variable](/configuration-global-variables). | ||
| 2. <PartialGlobalModelProviders /> | ||
|
|
||
| If a provider doesn't have any embedding models available, they won't be listed in the **Embedding Model** component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this duplicates a line from the partial.
|
|
||
| If a provider doesn't have any embedding models available, they won't be listed in the **Embedding Model** component. | ||
|
|
||
| :::tip My preferred provider or model isn't listed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably want to edit this tip to account for the new global config.
| 4. Toggle on the specific models you want to enable from the list of available models for that provider. | ||
| Models are grouped into **LLM Models** and **Embedding Models** sections. | ||
| If a provider doesn't have any language models available, they aren't listed in the Agent component. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 4. Toggle on the specific models you want to enable from the list of available models for that provider. | |
| Models are grouped into **LLM Models** and **Embedding Models** sections. | |
| If a provider doesn't have any language models available, they aren't listed in the Agent component. | |
| 4. Enable the specific models that you want to use in Langflow. | |
| The available models depends on the provider and your API key's permissions. | |
| Models that generate text are listed under **LLM Models**. | |
| Models that generate embeddings are listed under **Embedding Models**. |
| Models are grouped into **LLM Models** and **Embedding Models** sections. | ||
| If a provider doesn't have any language models available, they aren't listed in the Agent component. | ||
|
|
||
| Models are now configured globally and available to all components in your flows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Models are now configured globally and available to all components in your flows. | |
| After you enable a model in Langflow's global model configuration, you can use that model in any model-driven component in your flows. |
|
|
||
| - Global model provider configuration | ||
|
|
||
| Model providers for language models, embedding models, and agents are now configured globally in the **Model providers** pane, instead of within individual components. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could just use the partial here because you have it anyway and it says all of this stuff anyway :)
| Enable models once and then use them in any component across your flows. | ||
| For more information, see [Language Model component](/components-models). | ||
|
|
||
| If you need to use per-component API keys for different model providers in the same flow, use [bundle components](/components-bundle-components). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this sentence isn't clear. does it mean multiple keys for the same provider or other non-global providers?
If the latter, it might be easier to just reuse the tip from here https://github.com/langflow-ai/langflow/pull/11231/files#diff-0fb70484040c61f09d50109c82fb937a1e5a915433846817347a5b5812daf05dR32 as a new partial or add to the existing partial.
|
|
||
| 1. To open the **Model providers** pane, click <Icon name="BrainCog" aria-hidden="true" /> **Models** in the Langflow header. | ||
| 2. In the **Model providers** pane, select a provider from the list. | ||
| 3. In the **API Key** field, add your provider's API key. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if you can add more than one key per provider.
| 3. In the **API Key** field, add your provider's API key. | |
| 3. In the **API Key** field, add your provider's API key. | |
| The key must have permission to call the models you want to use in your flow, and your account must have sufficient credits for the actions you want to perform. | |
| You can only add one key for each provider. Make sure the key has access to _all_ models that you want to use in Langflow. |
| 2. In the **Model providers** pane, select a provider from the list. | ||
| 3. In the **API Key** field, add your provider's API key. | ||
| 4. Toggle on the specific models you want to enable from the list of available models for that provider. | ||
| Models are grouped into **LLM Models** and **Embedding Models** sections. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text will likely change
Preview build
The global model provider pane changes how Language models are selected for agents, the language model component, and embedding model components.
This pull request adds a partial for instructions on setting up and using the global provider pane, and adds the partial to tasks where needed.
Some changes to tasks based on this change too.
Added release note.