Client code
Installation
Chat Completion
from nido.client import NidoClient
from nido.models.chat_completion import ChatMessage
api_key = os.environ["NIDO_API_KEY"]
model = "nido-tiny"
client = NidoClient(api_key=api_key)
messages = [
ChatMessage(role="user", content="What is the best French cheese?")
]
# No streaming
chat_response = client.chat(
model=model,
messages=messages,
)
# With streaming
for chunk in client.chat_stream(model=model, messages=messages):
print(chunk)Embeddings
Third-Party Clients
Go
Last updated