Spaces:
Running
Running
# from litellm import completion | |
# from openai import OpenAI | |
# client = OpenAI( | |
# base_url="http://192.168.1.7:1337", | |
# api_key="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", | |
# ) | |
# completion = client.chat.completions.create( | |
# model="google/gemini-2.0-flash-001", | |
# messages= [ | |
# { "role": "user", "content": "What's the weather like in London?" } | |
# ], | |
# ) | |
# print(completion.choices[0].message) | |
from g4f.client import Client | |
client = Client() | |
response = client.images.generate( | |
model="flux", | |
prompt="a white siamese cat", | |
response_format="url" | |
) | |
print(f"Generated image URL: {response.data[0].url}") |