From bb867c4fcbc6f42770471f0a0117cd8909f660d7 Mon Sep 17 00:00:00 2001 From: sigoden Date: Tue, 11 Jun 2024 11:00:12 +0800 Subject: feat: support bot (#579) * feat: support bots * refactor with RoleLike * improve exiting session * make bot works with rag * refactor repl assert state * add bot banner * repl complete bots according bots.txt * fix on windows * remove threadpool executing function callings * adjust repl left_prompt * move bot config to global config.yaml * `.bot` throw err if funciton callings is not configured --- config.example.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'config.example.yaml') diff --git a/config.example.yaml b/config.example.yaml index 86fe221..fb5bcf2 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -41,7 +41,7 @@ summarize_prompt: 'Summarize the discussion briefly in 200 words or less to use summary_prompt: 'This is a summary of the chat history as a recap: ' # Custom REPL prompt, see https://github.com/sigoden/aichat/wiki/Custom-REPL-Prompt -left_prompt: '{color.green}{?session {session}{?role /}}{role}{?rag #{rag}{color.cyan}{?session )}{!session >}{color.reset} ' +left_prompt: '{color.green}{?session {?bot {bot}#}{session}{?role /}}{!session {?bot {bot}}}{role}{?rag @{rag}}{color.cyan}{?session )}{!session >}{color.reset} ' right_prompt: '{color.purple}{?session {?consume_tokens {consume_tokens}({consume_percent}%)}{!consume_tokens {consume_tokens}}}{color.reset}' clients: @@ -247,4 +247,10 @@ clients: - type: openai-compatible name: together api_base: https://api.together.xyz/v1 - api_key: xxx # ENV: {client}_API_KEY \ No newline at end of file + api_key: xxx # ENV: {client}_API_KEY + +bots: + - name: todo-sh + model: null + temperature: null + top_p: null \ No newline at end of file -- cgit v1.2.3