pydo.agent_inference.create_chat_completion()
Generated on 7 May 2026
from pydo version
v0.34.0
Description
Creates a model response for the given chat conversation via a customer-provisioned agent endpoint.
Parameters
| Name | Type | Required | Description | Default Value |
|---|---|---|---|---|
agent |
boolean | True | Must be set to true for agent-based completion behavior. | True |
body |
JSON or IO[bytes] | True |
Request Sample
import os
from pydo import Client
client = Client(
token=os.environ.get("AGENT_ACCESS_KEY"),
agent_endpoint=os.environ.get("AGENT_ENDPOINT"),
)
resp = client.agent.chat.completions.create(
model="llama3.3-70b-instruct",
messages=[
{"role": "user", "content": "What is the capital of Portugal?"},
],
)
print(resp.choices[0].message.content)More Information
See the API spec for this endpoint to view additional detail on responses, headers, parameters, and more.