Files
aitsc/exampleAiApp01/README.md
rjb c27fc21c1a
Some checks failed
Flask 提示词大师 - CI/CD 流水线 / 代码质量检查 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 单元测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 集成测试 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 构建Docker镜像 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到测试环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署到生产环境 (push) Has been cancelled
Flask 提示词大师 - CI/CD 流水线 / 部署监控系统 (push) Has been cancelled
aaa
2026-03-02 00:12:24 +08:00

42 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 提示词智能优化本地模型Android App
基于《生成专业提示词代码逻辑分析》,本地调用 LLM 实现智能提示词生成,**不依赖远程 Flask API**。
## 功能
- **两阶段专家逻辑**:先做意图分析(技术/创意/分析/咨询),再按领域选择专家模板生成提示词
- **本地模型调用**:通过 OpenAI 兼容接口(如 Ollama本地推理
- **配置灵活**:支持设置 API 地址和模型名称
## 环境
- Android Studio推荐 AGP 8.7+、Gradle 8.9
- minSdk 24targetSdk 34
- Java 17
## 使用前准备
1. **安装 Ollama或其他 OpenAI 兼容服务)**
- 官网https://ollama.ai
- 运行:`ollama run qwen2:0.5b`(或其它兼容模型)
2. **配置 API 地址**
- 模拟器:`http://10.0.2.2:11434/v1/`10.0.2.2 指向宿主机 localhost
- 真机:`http://<电脑局域网 IP>:11434/v1/`(如 `http://192.168.1.100:11434/v1/`
- 在 App 内点击「设置」可修改地址和模型名
## 构建
```bash
cd exampleAiApp01
./gradlew assembleDebug
```
或在 Android Studio 中打开 `exampleAiApp01` 目录,直接运行到真机或模拟器。
## 注意事项
- 需配置网络权限,并允许明文 HTTP`network_security_config.xml` 已配置)
- 确保设备与 Ollama 所在电脑处于同一局域网(真机)或使用模拟器
- 如缺少启动图标,可在 Android Studio 中通过 `File > New > Image Asset` 生成