get_field_desc.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import json
  2. from src.models.field_config import FieldConfig,get_field_descriptions
  3. from src.models.ai_execution_record import (
  4. Product, MarketingContentGeneration, AICompetitorAnalyzeMainKeywords,
  5. AICompetitorAnalyzeMainKeywordsResult,
  6. SearchAmazoneKeyResult,MarketingInfo,
  7. )
  8. import asyncio
  9. import aiofiles
  10. import os
  11. import sys
  12. {
  13. "main_keys": [
  14. {
  15. "asin": "商品(竞品)编号",
  16. "main_key": "主要关键词",
  17. "monthly_searches": "月搜索量",
  18. "reason": "选择该主关键词原因",
  19. }
  20. ],
  21. "supplement": "补充说明,非必填。如果你有额外的信息或建议,可以在这里添加。",
  22. "tail_keys": [
  23. {
  24. "tail_key": "长尾关键词",
  25. "monthly_searches": "月搜索量",
  26. "reason": "选择该长尾关键词原因"
  27. }
  28. ]
  29. }
  30. {
  31. "id": "MongoDB document ObjectID",
  32. "revision_id": "",
  33. "product": "",
  34. "prompting": {
  35. "name": "名称",
  36. "introduce": "介绍",
  37. "template": "llamaindex 提示模板",
  38. "keywords": "llamaindex 模板中的变量"
  39. },
  40. "input_data": "完整的输入数据",
  41. "output_data": "原始的AI输出结果",
  42. "executor_config": "",
  43. "helpful_level": "",
  44. "created_at": "",
  45. "task_type": "",
  46. "result": {
  47. "title": "",
  48. "st_search": "",
  49. "selling_point": [
  50. ""
  51. ],
  52. "product_introduction": ""
  53. }
  54. }
  55. async def task():
  56. res = get_field_descriptions(AICompetitorAnalyzeMainKeywordsResult)
  57. print(json.dumps(res, indent=4,ensure_ascii=False))
  58. res = get_field_descriptions(MarketingContentGeneration)
  59. print(json.dumps(res, indent=4,ensure_ascii=False))
  60. def main():
  61. asyncio.run(task())
  62. if __name__ == "__main__":
  63. main()