summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2025-02-10 22:22:55 +0800
committerGitHub <noreply@github.com>2025-02-10 22:22:55 +0800
commit3c21fac3665698bec860a49a66f5967e4449dc95 (patch)
tree11b7f3cface6b3cd2581c332f0489e69e8af4837
parent78f3d4ff49679da251a035f783d5b8380730cce5 (diff)
downloadaichat-3c21fac3665698bec860a49a66f5967e4449dc95.tar.gz
refactor: several improvements (#1166)
-rw-r--r--models.yaml91
-rw-r--r--src/client/common.rs4
2 files changed, 45 insertions, 50 deletions
diff --git a/models.yaml b/models.yaml
index 4875ce7..ab1e28a 100644
--- a/models.yaml
+++ b/models.yaml
@@ -11,20 +11,6 @@
output_price: 10
supports_vision: true
supports_function_calling: true
- - name: gpt-4o-2024-11-20
- max_input_tokens: 128000
- max_output_tokens: 16384
- input_price: 2.5
- output_price: 10
- supports_vision: true
- supports_function_calling: true
- - name: gpt-4o-2024-08-06
- max_input_tokens: 128000
- max_output_tokens: 16384
- input_price: 2.5
- output_price: 10
- supports_vision: true
- supports_function_calling: true
- name: chatgpt-4o-latest
max_input_tokens: 128000
max_output_tokens: 16384
@@ -105,57 +91,57 @@
# - https://ai.google.dev/api/rest/v1beta/models/streamGenerateContent
- provider: gemini
models:
- - name: gemini-1.5-pro-latest
- max_input_tokens: 2097152
+ - name: gemini-2.0-flash
+ max_input_tokens: 1048576
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
supports_function_calling: true
- - name: gemini-1.5-flash-latest
+ - name: gemini-2.0-flash-lite-preview
max_input_tokens: 1048576
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
supports_function_calling: true
- - name: gemini-1.5-flash-8b-latest
+ - name: gemini-2.0-flash-exp
max_input_tokens: 1048576
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
supports_function_calling: true
- - name: gemini-2.0-flash
- max_input_tokens: 1048576
+ - name: gemini-2.0-flash-thinking-exp
+ max_input_tokens: 32767
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
- supports_function_calling: true
- - name: gemini-2.0-flash-lite-preview
- max_input_tokens: 1048576
+ supports_reasoning: true
+ - name: gemini-2.0-pro-exp
+ max_input_tokens: 2097152
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
supports_function_calling: true
- - name: gemini-2.0-flash-exp
- max_input_tokens: 1048576
+ - name: gemini-1.5-pro-latest
+ max_input_tokens: 2097152
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
supports_function_calling: true
- - name: gemini-2.0-flash-thinking-exp
- max_input_tokens: 32767
+ - name: gemini-1.5-flash-latest
+ max_input_tokens: 1048576
max_output_tokens: 8192
input_price: 0
output_price: 0
supports_vision: true
- supports_reasoning: true
- - name: gemini-2.0-pro-exp
- max_input_tokens: 2097152
+ supports_function_calling: true
+ - name: gemini-1.5-flash-8b-latest
+ max_input_tokens: 1048576
max_output_tokens: 8192
input_price: 0
output_price: 0
@@ -399,15 +385,20 @@
max_input_tokens: 200000
input_price: 3
output_price: 15
- - name: sonar-reasoning
+ - name: sonar
max_input_tokens: 127000
input_price: 1
- output_price: 5
+ output_price: 1
+ - name: sonar-reasoning-pro
+ max_input_tokens: 127000
+ input_price: 2
+ output_price: 8
supports_reasoning: true
- - name: sonar
+ - name: sonar-reasoning
max_input_tokens: 127000
input_price: 1
- output_price: 1
+ output_price: 5
+ supports_reasoning: true
# Links:
# - https://console.groq.com/docs/models
@@ -447,20 +438,6 @@
# - https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/gemini
- provider: vertexai
models:
- - name: gemini-1.5-pro-002
- max_input_tokens: 2097152
- max_output_tokens: 8192
- input_price: 1.25
- output_price: 3.75
- supports_vision: true
- supports_function_calling: true
- - name: gemini-1.5-flash-002
- max_input_tokens: 1048576
- max_output_tokens: 8192
- input_price: 0.019
- output_price: 0.075
- supports_vision: true
- supports_function_calling: true
- name: gemini-2.0-flash-001
max_input_tokens: 1048576
max_output_tokens: 8192
@@ -490,6 +467,20 @@
max_output_tokens: 8192
supports_vision: true
supports_function_calling: true
+ - name: gemini-1.5-pro-002
+ max_input_tokens: 2097152
+ max_output_tokens: 8192
+ input_price: 1.25
+ output_price: 3.75
+ supports_vision: true
+ supports_function_calling: true
+ - name: gemini-1.5-flash-002
+ max_input_tokens: 1048576
+ max_output_tokens: 8192
+ input_price: 0.019
+ output_price: 0.075
+ supports_vision: true
+ supports_function_calling: true
- name: claude-3-5-sonnet-v2@20241022
max_input_tokens: 200000
max_output_tokens: 8192
@@ -1071,6 +1062,10 @@
input_price: 0.07
max_tokens_per_chunk: 8192
default_chunk_size: 2000
+ - name: rerank
+ type: reranker
+ max_input_tokens: 4096
+ input_price: 0.112
# Links:
# - https://platform.lingyiwanwu.com/docs#%E6%A8%A1%E5%9E%8B%E4%B8%8E%E8%AE%A1%E8%B4%B9
diff --git a/src/client/common.rs b/src/client/common.rs
index 99b84b9..4db87f2 100644
--- a/src/client/common.rs
+++ b/src/client/common.rs
@@ -561,7 +561,7 @@ async fn set_client_models_config(client_config: &mut Value, client: &str) -> Re
.await
{
Ok(fetched_models) => {
- model_names = MultiSelect::new("LLM models (required):", fetched_models)
+ model_names = MultiSelect::new("LLMs to include (required):", fetched_models)
.with_validator(|list: &[ListOption<&String>]| {
if list.is_empty() {
Ok(Validation::Invalid(
@@ -580,7 +580,7 @@ async fn set_client_models_config(client_config: &mut Value, client: &str) -> Re
}
if model_names.is_empty() {
model_names = prompt_input_string(
- "LLM models",
+ "LLMs to add",
true,
Some("Separated by commas, e.g. llama3.3,qwen2.5"),
)?