diff --git a/.env.template b/.env.template new file mode 100644 index 0000000..88a50c1 --- /dev/null +++ b/.env.template @@ -0,0 +1,24 @@ +# 数据库配置 +# DB_URL=postgresql+psycopg://ai:ai@localhost:5532/ai + +# OpenAI API配置 +API_KEY=sk-oftybjqntjpxlhkcxkieluljb +EMBEDDING_MODEL=BAAI/bge-large-zh-v1.5 +EMBEDDING_BASE_URL=https://api.siliconflow.cn/v1 +MODEL_LIST=Qwen2.5-72B=openai:Qwen/Qwen2.5-72B-Instruct&gpt-4o=openai:gpt-4o + +# 模型配置 +MODEL_BASE_URL=https://api.siliconflow.cn/v1 + +# 文件路径配置 +KNOWLEDGE_SOURCE_DIR=data +MEMORY_DB_FILE=tmp/agent_memory.db +VECTOR_DB_PATH=tmp/lancedb +SESSION_STORAGE_PATH=tmp/agent_sessions_json + +# 知识库加载控制 +LOAD_KNOWLEDGE=true + +AGNO_MONITOR=true +AGNO_TELEMETRY=true +AGNO_DEBUG=true \ No newline at end of file diff --git a/ui.py b/ui.py index 962f64c..c5050cc 100644 --- a/ui.py +++ b/ui.py @@ -1,3 +1,4 @@ +import os from typing import List import streamlit as st @@ -83,14 +84,16 @@ def show_tabs(): # if tabs[index]["name"] == selected_tab: # set_current_page(value["name"]) -model_options = { - "Qwen2.5-72B": "openai:Qwen/Qwen2.5-72B-Instruct", - "o3-mini": "openai:o3-mini", - "gpt-4o": "openai:gpt-4o", - "gemini-2.0-flash-exp": "google:gemini-2.0-flash-exp", - "claude-3-5-sonnet": "anthropic:claude-3-5-sonnet-20241022", - "llama-3.3-70b": "groq:llama-3.3-70b-versatile", - } +# model_options = { +# "Qwen2.5-72B": "openai:Qwen/Qwen2.5-72B-Instruct", +# "o3-mini": "openai:o3-mini", +# "gpt-4o": "openai:gpt-4o", +# "gemini-2.0-flash-exp": "google:gemini-2.0-flash-exp", +# "claude-3-5-sonnet": "anthropic:claude-3-5-sonnet-20241022", +# "llama-3.3-70b": "groq:llama-3.3-70b-versatile", +# } + +model_options = dict(item.split('=') for item in os.getenv("MODEL_LIST", "Qwen2.5-72B=openai:Qwen/Qwen2.5-72B-Instruct").split('&')) def get_modul_option(id: int = 0) -> str: """Return the selected module option"""