import os
os.environ["COZE_API_KEY"] = "your-coze-api-key"
os.environ["COZE_BOT_ID"] = "your-coze-bot-id"
from unionllm import unionchat
# model call
response = unionchat(
provider="coze",
model="coze",
messages = [{ "content": "Hello, how are you?","role": "user"}],
stream=False
)
print(response)
from unionllm import unionchat
# model call
response = unionchat(
provider="tiangong",
model="SkyChat-MegaVerse",
messages = [{ "content": "Hello, how are you?","role": "user"}],
stream=True
)
for chunk in response:
print(chunk)
# model call
response = unionchat(
provider="coze",
model="coze",
api_key="your-coze-api-key",
bot_id="your-coze-bot-id",
messages = [{ "content": "Hello, how are you?","role": "user"}]
)