We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95f665b commit d9e2d66Copy full SHA for d9e2d66
client.py
@@ -0,0 +1,20 @@
1
+import aisuite as ai
2
+from dotenv import dotenv_values
3
+
4
+config = dotenv_values(".env")
5
+client = ai.Client()
6
7
+models = ["openai:gpt-4o", "anthropic:claude-3-5-sonnet-20240620"]
8
9
+messages = [
10
+ {"role": "system", "content": "Respond in an Italian Accent."},
11
+ {"role": "user", "content": "Tell me the probability of severe weather."},
12
+]
13
14
+for model in models:
15
+ response = client.chat.completions.create(
16
+ model=model,
17
+ messages=messages,
18
+ temperature=0.75
19
+ )
20
+ print(response.choices[0].message.content)
0 commit comments