Skip to content

v0.20.0

Compare
Choose a tag to compare
@github-actions github-actions released this 02 Aug 10:03
· 180 commits to main since this release
514a368

Patch Client API

AIChat supports patching API request url, headers and body.

For example, we can patch claude:claude-3-5-sonnet-20240620 to use beta 8192 output tokens.

clients:
  - type: claude
    ...
    patch:                                # Patch api request
      chat_completions:                   # Api type, one of chat_completions, embeddings, and rerank
        'claude-3-5-sonnet-20240620':     # The regex to match model names, e.g. '.*' 'gpt-4o' 'gpt-4o|gpt-4-.*'
          headers:
            anthropic-beta: max-tokens-3-5-sonnet-2024-07-15
          body:
            max_tokens: 8192

More flexible using tools

AIChat introduces the use_tools configuration to manage which tools are included. This configuration works across global, role, session, and agent levels.
AIChat also introduces mapping_tools for managing aliases for a tool or toolset.

mapping_tools:
  fs: 'fs_cat,fs_ls,fs_mkdir,fs_rm,fs_write'
use_tools: 'execute_command,fs'

Configuration Changes

- buffer_editor: null
+ editor: null

- dangerously_functions_filter: null
- agents:
-   - name: todo
-     ...

The tool determines whether the operation is dangerous and whether to ask for confirmation, the dangerously_functions_filter is unnecessary.

Each AI agent has its own config.yaml file, there is no need for a central agents configuration.

Enviroment Variables Changes

  • AIChat supports env file (<aichat-config-dir>/.env) for managing environment variables.

  • All config items have related environment variables to override their values.

    For example, we can use AICHAT_MODEL to override the default LLM and AICHAT_LIGHT_THEME to switch to light theme.

  • AIChat Supports env AICHAT_PATCH_{client}_CHAT_COMPLETIONS for patching chat completions api request url, headers and body.

    For example, set AICHAT_PATCH_OPENAI_CHAT_COMPLETIONS='{"gpt-4o":{"body":{"seed":666,"temperature":0}}}' to make gpt-4o more deterministic.

Client Changes

  • vertexai client supports cluade/mistral models, vertexai-claude client was abandoned.
  • bedrock client switch to converse api, supports llama3.1/mistral-large-v2/cohere.command-r models.
  • rag-dedicated client was abandoned, use openai-compatible client instead.

CLI Changes

-  -w, --wrap <WRAP>          Control text wrapping (no, auto, <max-width>)
-  -H, --no-highlight         Turn off syntax highlighting
-      --light-theme          Use light theme

Use environment variables AICHAT_WRAP, AICHAT_HIGHLIGHT and AICHAT_LIGHT_THEME instead.

New REPL Commands

.variable <name> <value>
.set stream false
.set use_tools <tools>

New Features

  • load env vars from file (#685)
  • enhenced flexibility for use tools (#688)
  • agent can reuse tools (#690)
  • support agent variables (#692)
  • --file/.file can load dirs (#693)
  • adjust the way of obtaining function call results (#695)
  • webui supports text to speech for messages (#712)
  • enhance logger (#731)
  • move agent config to separate file (#741)
  • webui add autofocus to chat-input in textarea (#742)
  • merge vertexai-cluade with vertexai (#745)
  • vertexai support mistral models (#746)
  • ollama support tools and new embeddings api (#748)
  • all config fields have related environment variables (#751)
  • bedrock client switch to converse api and support cohere models (#747)
  • support patching request url, headers and body (#756)
  • abandon rag_dedicated client and improve (#757)
  • abandon cli options --wrap, --no-highlight and --light-theme (#758)
  • add config.stream and .set stream repl command (#759)
  • export agent variable as LLM_AGENT_VAR_* (#766)
  • add agent-scoped agent_prelude config (#770)
  • rename config.buffer_editor to config.editor (#773)

Bug Fixes

  • .starter tab completion (#709)
  • webui input-panel exceeds viewpoint on mobile (#714)
  • problem with input token limit (#737)
  • invalid tool_calls of qianwen client (#740)
  • unable to rebuild agent rag (#763)