sales-assistant-py-new/app/dto/qa_info.py

13 lines
392 B
Python
Raw 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.

from dataclasses import Field
from typing import List
from openai import BaseModel
class QAPair(BaseModel):
question: str = Field(description="从聊天记录中提取或生成的问题")
answer: str = Field(description="问题的答案,如果没有明确答案则留空")
class QAList(BaseModel):
qa_pairs: List[QAPair] = Field(description="生成的QA对列表1-2个")