-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
45 lines (44 loc) · 1.44 KB
/
Copy pathconfig.py
File metadata and controls
45 lines (44 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
generation_config = {
"response_mime_type": "application/json",
"response_schema": {
"type": "object",
"properties": {
"answer": {"type": "string"},
"confidence_score": {"type": "number"},
"need_api": {
"type": "object",
"nullable": True,
"properties": {
"type": {"type": "string", "enum": ["GET", "POST"]},
"url": {"type": "string"},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {"type": "string"},
"value": {"type": "string"}
},
"required": ["key", "value"]
}
},
"body": {"nullable": True}
},
"required": ["type", "url"]
}
},
"required": ["answer", "confidence_score", "need_api"]
}
}
"""
Return ONLY this JSON (no markdown, no extra text):
{{
"answer": "combine answers into key-word rich, descriptive,string",
"confidence_score": <float between 0 and 1>,
"need_api": false | {{
"type": "GET" | "POST",
"url": "<api or webpage URL>",
"headers": <optional>,
"body": <optional>
}}
}}"""