ai.ts 695 B

123456789101112131415161718192021222324252627282930
  1. // AI配置文件
  2. export interface AIConfig {
  3. baseURL: string
  4. apiKey: string
  5. model: string
  6. timeout: number
  7. maxTokens: number
  8. temperature: number
  9. }
  10. // 菜系提示词模板
  11. export const CUISINE_PROMPTS = {
  12. system: '你是一位专业的厨师,请根据用户提供的食材和菜系要求,生成详细的菜谱。',
  13. responseFormat: `请按照以下JSON格式返回菜谱:
  14. {
  15. "name": "菜品名称",
  16. "ingredients": ["食材1", "食材2"],
  17. "steps": [
  18. {
  19. "step": 1,
  20. "description": "步骤描述",
  21. "time": 5,
  22. "temperature": "中火"
  23. }
  24. ],
  25. "cookingTime": 30,
  26. "difficulty": "medium",
  27. "tips": ["技巧1", "技巧2"]
  28. }`
  29. }