2023-10-31 09:34:16 +00:00
|
|
|
model: openai:gpt-3.5-turbo # LLM model
|
2024-03-22 11:24:22 +00:00
|
|
|
temperature: 1.0 # LLM temperature
|
2023-10-31 09:34:16 +00:00
|
|
|
save: true # Whether to save the message
|
2023-10-30 11:52:51 +00:00
|
|
|
highlight: true # Set false to turn highlight
|
2023-10-31 09:34:16 +00:00
|
|
|
light_theme: false # Whether to use a light theme
|
2023-10-31 10:34:38 +00:00
|
|
|
wrap: no # Specify the text-wrapping mode (no, auto, <max-width>)
|
2023-10-30 11:52:51 +00:00
|
|
|
wrap_code: false # Whether wrap code block
|
|
|
|
auto_copy: false # Automatically copy the last output to the clipboard
|
2023-11-07 11:14:58 +00:00
|
|
|
keybindings: emacs # REPL keybindings. (emacs, vi)
|
|
|
|
prelude: '' # Set a default role or session (role:<name>, session:<name>)
|
2024-03-26 23:00:28 +00:00
|
|
|
save_session: false # Whether to save the session automatically
|
2023-10-30 11:52:51 +00:00
|
|
|
|
2024-03-04 03:08:59 +00:00
|
|
|
# Compress session if tokens exceed this value (valid when >=1000)
|
|
|
|
compress_threshold: 1000
|
|
|
|
# The prompt for summarizing session messages
|
|
|
|
summarize_prompt: 'Summarize the discussion briefly in 200 words or less to use as a prompt for future context.'
|
|
|
|
# The prompt for the summary of the session
|
|
|
|
summary_prompt: 'This is a summary of the chat history as a recap: '
|
|
|
|
|
2023-12-24 08:04:18 +00:00
|
|
|
# Custom REPL prompt, see https://github.com/sigoden/aichat/wiki/Custom-REPL-Prompt
|
|
|
|
left_prompt: '{color.green}{?session {session}{?role /}}{role}{color.cyan}{?session )}{!session >}{color.reset} '
|
|
|
|
right_prompt: '{color.purple}{?session {?consume_tokens {consume_tokens}({consume_percent}%)}{!consume_tokens {consume_tokens}}}{color.reset}'
|
|
|
|
|
2023-10-31 08:50:08 +00:00
|
|
|
clients:
|
|
|
|
# All clients have the following configuration:
|
|
|
|
# - type: xxxx
|
|
|
|
# name: nova # Only use it to distinguish clients with the same client type. Optional
|
|
|
|
# extra:
|
|
|
|
# proxy: socks5://127.0.0.1:1080 # Specify https/socks5 proxy server. Note HTTPS_PROXY/ALL_PROXY also works.
|
|
|
|
# connect_timeout: 10 # Set a timeout in seconds for connect to server
|
|
|
|
|
2023-10-30 11:52:51 +00:00
|
|
|
# See https://platform.openai.com/docs/quickstart
|
2023-10-31 08:50:08 +00:00
|
|
|
- type: openai
|
2023-12-19 12:37:53 +00:00
|
|
|
api_key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
2024-01-30 10:28:12 +00:00
|
|
|
api_base: https://api.openai.com/v1 # Optional field
|
|
|
|
organization_id: org-xxxxxxxxxxxxxxxxxxxxxxxx # Optional field
|
2023-10-30 11:52:51 +00:00
|
|
|
|
2023-12-19 23:49:05 +00:00
|
|
|
# See https://ai.google.dev/docs
|
|
|
|
- type: gemini
|
2024-03-07 12:31:06 +00:00
|
|
|
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
2024-03-25 13:06:35 +00:00
|
|
|
block_threshold: BLOCK_NONE # Optional field, choices: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE
|
2023-10-31 08:50:08 +00:00
|
|
|
|
2024-02-28 00:22:15 +00:00
|
|
|
# See https://docs.anthropic.com/claude/reference/getting-started-with-the-api
|
|
|
|
- type: claude
|
2024-03-25 02:52:05 +00:00
|
|
|
api_key: sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
2024-02-28 00:22:15 +00:00
|
|
|
|
|
|
|
- type: mistral
|
|
|
|
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
|
2024-03-25 02:52:05 +00:00
|
|
|
# Any openai-compatible API providers
|
2024-03-25 03:13:54 +00:00
|
|
|
- type: openai-compatible
|
|
|
|
name: localai
|
2023-10-31 08:50:08 +00:00
|
|
|
api_base: http://localhost:8080/v1
|
2024-03-25 02:52:05 +00:00
|
|
|
api_key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
2023-12-19 23:49:05 +00:00
|
|
|
chat_endpoint: /chat/completions # Optional field
|
2023-11-01 02:28:54 +00:00
|
|
|
models:
|
2024-02-28 00:22:15 +00:00
|
|
|
- name: llama2
|
2024-03-06 00:35:40 +00:00
|
|
|
max_input_tokens: 8192
|
2024-01-30 11:43:55 +00:00
|
|
|
extra_fields: # Optional field, set custom parameters
|
|
|
|
key: value
|
2024-01-13 11:52:07 +00:00
|
|
|
- name: llava
|
2024-03-06 00:35:40 +00:00
|
|
|
max_input_tokens: 8192
|
2024-03-25 13:06:35 +00:00
|
|
|
capabilities: text,vision # Optional field, choices: text, vision
|
2023-11-04 00:11:51 +00:00
|
|
|
|
2023-12-19 23:49:05 +00:00
|
|
|
# See https://github.com/jmorganca/ollama
|
|
|
|
- type: ollama
|
2023-12-25 00:05:06 +00:00
|
|
|
api_base: http://localhost:11434
|
2023-12-24 08:04:18 +00:00
|
|
|
api_key: Basic xxx # Set authorization header
|
2023-12-19 23:49:05 +00:00
|
|
|
chat_endpoint: /chat # Optional field
|
|
|
|
models:
|
2024-03-25 00:23:54 +00:00
|
|
|
- name: llama2
|
2024-03-06 00:35:40 +00:00
|
|
|
max_input_tokens: 8192
|
2023-12-19 23:49:05 +00:00
|
|
|
|
|
|
|
# See https://learn.microsoft.com/en-us/azure/ai-services/openai/chatgpt-quickstart
|
|
|
|
- type: azure-openai
|
2024-02-15 00:10:30 +00:00
|
|
|
api_base: https://{RESOURCE}.openai.azure.com
|
2023-12-19 23:49:05 +00:00
|
|
|
api_key: xxx
|
|
|
|
models:
|
|
|
|
- name: MyGPT4 # Model deployment name
|
2024-03-06 00:35:40 +00:00
|
|
|
max_input_tokens: 8192
|
2023-12-19 12:37:53 +00:00
|
|
|
|
2024-02-28 00:22:15 +00:00
|
|
|
# See https://cloud.google.com/vertex-ai
|
|
|
|
- type: vertexai
|
|
|
|
api_base: https://{REGION}-aiplatform.googleapis.com/v1/projects/{PROJECT_ID}/locations/{REGION}/publishers/google/models
|
|
|
|
# Setup Application Default Credentials (ADC) file, Optional field
|
|
|
|
# Run `gcloud auth application-default login` to setup adc
|
|
|
|
# see https://cloud.google.com/docs/authentication/external/set-up-adc
|
|
|
|
adc_file: <path-to/gcloud/application_default_credentials.json>
|
2024-03-25 13:06:35 +00:00
|
|
|
block_threshold: BLOCK_ONLY_HIGH # Optional field, choices: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE
|
2024-02-28 00:22:15 +00:00
|
|
|
|
2023-11-04 00:54:40 +00:00
|
|
|
# See https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html
|
|
|
|
- type: ernie
|
2023-12-19 12:37:53 +00:00
|
|
|
api_key: xxxxxxxxxxxxxxxxxxxxxxxx
|
|
|
|
secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
2023-11-04 01:51:01 +00:00
|
|
|
|
|
|
|
# See https://help.aliyun.com/zh/dashscope/
|
|
|
|
- type: qianwen
|
2024-02-15 00:10:30 +00:00
|
|
|
api_key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
2024-03-25 00:23:54 +00:00
|
|
|
|
|
|
|
# See https://platform.moonshot.cn/docs/intro
|
|
|
|
- type: moonshot
|
2024-03-25 02:52:05 +00:00
|
|
|
api_key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|