@@ -39,20 +39,33 @@ names must match the provider names known in the [litellm](https://docs.litellm.
3939Parameters specified for each of the providers in the ` providers ` section apply to every llm in the ` llms ` section unless the same
4040parameter is also specified for the llm, in which case that value takes precedence.
4141
42+ IMPORTANT: environment variable based settings, e.g. ` api_key_env ` will respect any ` .env ` file in the current directory when
43+ the config file is read, updated or an LLM is initialized!
44+
4245The following parameters are known and supported in the ` llms ` and/or ` providers ` sections:
4346
4447* ` llm ` (` llms ` section only): specifies a specific model using the format ` providername/modelid ` .
4548* ` api_key ` : the literal API key to use
46- * ` api_key_env ` : the environment variable which contains the API key
49+ * ` api_key_env ` : the environment variable which contains the API key, using the value from the current environment or whatever is defined in .env
4750* ` api_url ` : the base URL to use for the model, e.g. for an ollama server. The URL may contain placeholders which will get replaced with
4851 the model name (` ${model} ` ), or the user and password for basic authentication (` ${user} ` , ` ${password} ` ), e.g.
4952 ` http://${user}:${password}@localhost:11434 `
5053* ` user ` , ` password ` : the user and password to use for basic authentication, this requires ` api_url ` to also be specified with the
5154 corresponding placeholders
55+ * ` user_env ` , ` password_env ` : the environment variable to get the user or password from, this uses the value from the current enviroment or whatever
56+ has been set in any ` .env ` file in the current directory.
5257* ` alias ` (` llms ` section only): an alias name for the model which will have to be used in the API. If no ` alias ` is specified, the name
5358 specified for ` llm ` is used.
5459* ` num_retries ` : if present, can specify the number of retries to perform if an error occurs before giving up
5560* ` timeout ` : if present, raise timeout error after that many seconds
61+ * ` via_streaming ` : the default approach for getting LLM responses is to wait for the complete response to get returned. This can lead to time-outs
62+ or other problems with some LLMs. When this is set to true, the response will get retrieved using streaming. However, some information like
63+ cost is not available as part of the ` llms_wrapper ` response if streaming is enabled.
64+ * ` min_delay ` : the minimum delay in seconds to ensure between requests sent to the model from code running in the same process and thread.
65+ * ` cost_per_prompt_token ` : set or override the cost per prompt token for the model
66+ * ` cost_per_output_token ` : set or override the cost per output token for the model
67+ * ` max_output_tokens ` : set or override the maximum output tokens for the model
68+ * ` max_input_tokens ` : set or override the maximum input tokens for the model
5669
5770All other settings are passed as is to the model invocation function. Different providers or APIs may support different parameters, but
5871most will support ` temperature ` , ` max_tokens ` and ` top_p `
0 commit comments