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 1cd4b74 commit 21aac84Copy full SHA for 21aac84
fastchat/serve/scripts/test.py
@@ -0,0 +1,26 @@
1
+import os
2
+from litellm import image_generation
3
+
4
+# Set up API keys and credentials
5
+# export OPENAI_API_KEY = "your_openai_api_key"
6
+# export VERTEX_AI_PROJECT = "your_vertex_project_id"
7
+# export VERTEX_AI_LOCATION = "us-central1"
8
9
+prompt = "A cute baby sea otter"
10
11
+# OpenAI
12
13
+#response = image_generation(prompt=prompt, model="dall-e-3")
14
15
+#print(f"response: {response.url}")
16
17
+# Vertex AI
18
19
+response = image_generation(
20
+ prompt=prompt,
21
+ model="vertex_ai/imagegeneration@006",
22
+ vertex_ai_project="adroit-crow-413218",
23
+ vertex_ai_location="us-central1",
24
+)
25
26
+print(f"response: {response}")
0 commit comments