Код: Выделить всё
prompt = “”"
Analyze the conversation so far. Provide a 20-word summary and classify the client’s sentiment into: neutral, negative, or positive.
Format:
summary: {summary}
sentiment: {sentiment}
“”"
event = {
“type”: “response.create”,
“response”: {
“conversation”: “none”,
“metadata”: {“topic”: “sentiment_update”},
“output_modalities”: [“text”],
“instructions”: prompt,
},
}
ws.send(json.dumps(event))
Пример моего ответа:
Код: Выделить всё
{
“type”: “response.done”,
“event_id”: “event_XXXXX”,
“response”: {
“object”: “realtime.response”,
“id”: “resp_YYYYY”,
“status”: “completed”,
“status_details”: null,
“output”: [
{
“id”: “item_ZZZZZ”,
“type”: “message”,
“status”: “completed”,
“role”: “assistant”,
“content”: [
{
“type”: “output_text”,
“text”: “I’d like to know if you placed an order within the last 3 months.”
....
“metadata”: {
“topic”: “sentiment_update”
}
}
Я подозреваю, что модель неправильно обращается к истории разговоров. Как я могу правильно ссылаться на предыдущие сообщения, чтобы составить правильную внешнюю сводку, используя response.create?
ссылка: https://platform.openai.com/docs/guides ... nversation
Подробнее здесь: https://stackoverflow.com/questions/798 ... ing-respon
Мобильная версия