promptflow
50 строк · 1.1 Кб
1---
2name: Json Format Prompt
3description: A basic prompt that uses the GPT-3 chat API to answer questions
4model:
5api: chat
6configuration:
7type: azure_openai
8azure_deployment: gpt-35-turbo-0125
9connection: open_ai_connection
10parameters:
11max_tokens: 128
12temperature: 0.2
13response_format:
14type: json_object
15inputs:
16first_name:
17type: string
18default: John
19last_name:
20type: string
21default: Doh
22question:
23type: string
24chat_history:
25type: list
26default: []
27outputs:
28name:
29type: string
30answer:
31type: string
32
33sample: ${file:sample.json}
34---
35system:
36You are an AI assistant who helps people find information.
37As the assistant, you answer questions briefly, succinctly. Your structured response. Only accepts JSON format, likes below:
38{"name": customer_name, "answer": the answer content}
39
40# Customer
41You are helping {{first_name}} {{last_name}} to find answers to their questions.
42Use their name to address them in your responses.
43
44{% for item in chat_history %}
45{{item.role}}:
46{{item.content}}
47{% endfor %}
48
49user:
50{{question}}