2025年5月22日 星期四

安裝magentic ui

 # 創建虛擬環境

python3 -m venv .venv

.venv\Scripts\activate

.venv\Scripts\deactivate  --卸載


# 安裝Magentic-UI

pip install magentic-ui


# 設置API密鑰并啟動

export OPENAI_API_KEY=<YOUR_API_KEY>

magentic ui --port 8081


pip install magentic-ui[ollama]


magentic ui --config O:/magentic-ui/config.yaml

config.yaml如下

model_config:  &client

  provider: autogen_ext.models.openai.OpenAIChatCompletionClient

  config:

    model: gemma3:12b

    base_url: http://localhost:11434/v1

    api_key: ollama

    max_retries: 3

    model_info:

      vision: true

      function_calling: true

      json_output: false

      family: unknown

      structured_output: true


orchestrator_client: *client

coder_client: *client

web_surfer_client: *client

file_surfer_client: *client

action_guard_client: *client

沒有留言:

張貼留言