-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.py
63 lines (53 loc) · 1.63 KB
/
configure.py
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import predictionguard as pg
# Create a new client
client = pg.Client()
# Delete any existing proxy endpoints from previous
# configurations and recreate them.
chatGen = "chatpg-gen"
client.delete_proxy(chatGen)
# Create our generator proxy endpoint.
print("")
print("Creating generator proxy endpoint...")
print("----------------------------------")
gen_ex1 = {
"input": {
"prompt": """The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.
Human: Hello, who are you?
AI: I am an AI created with Prediction Guard. How can I help you today?
Human: I'd like to ask a question.
AI:"""
},
"output": {
"text": "Great! Please ask your question."
}
}
gen_ex2 = {
"input": {
"prompt": """The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.
Human: Hello, who are you?
AI: I am an AI created with Prediction Guard. How can I help you today?
Human: I'm wondering if you can help me with a problem.
AI:"""
},
"output": {
"text": "Sure! What's the problem?"
}
}
gen_ex3 = {
"input": {
"prompt": """The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.
Human: Hello, who are you?
AI: I am an AI created with Prediction Guard. How can I help you today?
Human: What is the capital of France?
AI:"""
},
"output": {
"text": "The capital of France is Paris."
}
}
gen_examples = [
gen_ex1,
gen_ex2,
gen_ex3
]
client.create_proxy(task="text-gen", name=chatGen, examples=gen_examples)