diff options
| author | sigoden <sigoden@gmail.com> | 2024-03-06 08:35:40 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-06 08:35:40 +0800 |
| commit | 8e5d4e55b1a5158a1f35adaf044dec545159f426 (patch) | |
| tree | b360cc4e9ad8acccea3c68b37057798cd1d657c0 /src/client/azure_openai.rs | |
| parent | be4e5e569a61c54d8ac8fb77144e9b1d01e3b81f (diff) | |
| download | aichat-8e5d4e55b1a5158a1f35adaf044dec545159f426.tar.gz | |
refactor: rename model's `max_tokens` to `max_input_tokens` (#339)
BREAKING CHANGE: rename model's `max_tokens` to `max_input_tokens`
Diffstat (limited to 'src/client/azure_openai.rs')
| -rw-r--r-- | src/client/azure_openai.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/azure_openai.rs b/src/client/azure_openai.rs index 5c9f3ef..e553f3f 100644 --- a/src/client/azure_openai.rs +++ b/src/client/azure_openai.rs @@ -28,8 +28,8 @@ impl AzureOpenAIClient { ("api_key", "API Key:", true, PromptKind::String), ("models[].name", "Model Name:", true, PromptKind::String), ( - "models[].max_tokens", - "Max Tokens:", + "models[].max_input_tokens", + "Max Input Tokens:", true, PromptKind::Integer, ), @@ -43,7 +43,7 @@ impl AzureOpenAIClient { .iter() .map(|v| { Model::new(client_name, &v.name) - .set_max_tokens(v.max_tokens) + .set_max_input_tokens(v.max_input_tokens) .set_capabilities(v.capabilities) .set_tokens_count_factors(OPENAI_TOKENS_COUNT_FACTORS) }) |
