Skip to content

Commit

Permalink
docs: standard params (#23199)
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Jun 20, 2024
1 parent a4bcb45 commit bd5c92a
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/docs/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,19 @@ LangChain does not host any Chat Models, rather we rely on third party integrati

We have some standardized parameters when constructing ChatModels:
- `model`: the name of the model

ChatModels also accept other parameters that are specific to that integration.
- `temperature`: the sampling temperature
- `timeout`: request timeout
- `max_tokens`: max tokens to generate
- `stop`: default stop sequences
- `max_retries`: max number of times to retry requests
- `api_key`: API key for the model provider
- `base_url`: endpoint to send requests to

Some important things to note:
- standard params only apply to model providers that expose parameters with the intended functionality. For example, some providers do not expose a configuration for maximum output tokens, so max_tokens can't be supported on these.
- standard params are currently only enforced on integrations that have their own integration packages (e.g. `langchain-openai`, `langchain-anthropic`, etc.), they're not enforced on models in ``langchain-community``.

ChatModels also accept other parameters that are specific to that integration. To find all the parameters supported by a ChatModel head to the API reference for that model.

:::important
**Tool Calling** Some chat models have been fine-tuned for tool calling and provide a dedicated API for tool calling.
Expand Down

0 comments on commit bd5c92a

Please sign in to comment.