增加模型可配置功能
This commit is contained in:
@@ -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
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
import streamlit as st
|
import streamlit as st
|
||||||
@@ -83,14 +84,16 @@ def show_tabs():
|
|||||||
# if tabs[index]["name"] == selected_tab:
|
# if tabs[index]["name"] == selected_tab:
|
||||||
# set_current_page(value["name"])
|
# set_current_page(value["name"])
|
||||||
|
|
||||||
model_options = {
|
# model_options = {
|
||||||
"Qwen2.5-72B": "openai:Qwen/Qwen2.5-72B-Instruct",
|
# "Qwen2.5-72B": "openai:Qwen/Qwen2.5-72B-Instruct",
|
||||||
"o3-mini": "openai:o3-mini",
|
# "o3-mini": "openai:o3-mini",
|
||||||
"gpt-4o": "openai:gpt-4o",
|
# "gpt-4o": "openai:gpt-4o",
|
||||||
"gemini-2.0-flash-exp": "google:gemini-2.0-flash-exp",
|
# "gemini-2.0-flash-exp": "google:gemini-2.0-flash-exp",
|
||||||
"claude-3-5-sonnet": "anthropic:claude-3-5-sonnet-20241022",
|
# "claude-3-5-sonnet": "anthropic:claude-3-5-sonnet-20241022",
|
||||||
"llama-3.3-70b": "groq:llama-3.3-70b-versatile",
|
# "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:
|
def get_modul_option(id: int = 0) -> str:
|
||||||
"""Return the selected module option"""
|
"""Return the selected module option"""
|
||||||
|
|||||||
Reference in New Issue
Block a user