# ai-agent-base **Repository Path**: pish7/ai-agent-base ## Basic Information - **Project Name**: ai-agent-base - **Description**: 这是一个 ai agent 的入门示例 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-18 - **Last Updated**: 2026-01-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 环境变量 创建一个 .env 文件,内容如下: ```sh API_KEY=sk-busgzbdzwfgpbtjgfsnbknftiyafxhswierhdmzlxxxxxxxx BASE_URL=https://api.siliconflow.cn/v1 MODEL=xiaomi/mimo-v2-flash:free # 高德地图 AMAP_KEY=ec14a306695990b1a8b7c43812a6xxxx # 嵌入模型 # 如果使用本地 ollama 模型,则只需要定义 EMBED_MODEL EMBED_MODEL=BAAI/bge-m3 EMBED_URL=https://api.siliconflow.cn/v1 EMBED_KEY=sk-busgzbdzwfgpbtjgfsnbknftiyafxhswierhdmzlxxxxxxxx ``` ## 通过接口访问 Ollama 的嵌入模式 ```sh curl http://localhost:11434/api/embeddings \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3-embedding:4b", "prompt": "Hello world" }' curl http://localhost:11434/api/embed \ -H "Content-Type: application/json" \ -d '{ "model": "qwen3-embedding:4b", "input": "Hello world" }' ```