## Dedalus Runner
DedalusRunner द्वारा non-streaming tool execution runs के लिए लौटाया गया response object।दिखाएं गुण (Properties)
दिखाएं गुण (Properties)
सभी tool executions के पूर्ण हो जाने के बाद वार्तालाप से प्राप्त अंतिम text output
रन के दौरान उपयोग किए गए कुल steps (LLM calls) की संख्या
रन के दौरान कॉल किए गए tools के नामों की सूची
पूरी वार्तालाप history, जिसमें system prompts, user संदेश, assistant responses और tool calls/परिणाम शामिल हैं। debugging, logging या वार्तालाप को आगे जारी रखने के लिए उपयोगी।
detected intents की वैकल्पिक सूची (जब
return_intent=true हो)final_output का उपनाम (legacy compatibility के लिए)final_output का उपनाम (legacy compatibility के लिए)दिखाएं Methods
दिखाएं Methods
follow-up runs में उपयोग के लिए पूरी वार्तालाप history (
messages) की एक copy लौटाता है। परिणाम को बाद की runner.run() कॉल्स में पास करके multi-turn वार्तालाप सक्षम करता है।Example
from dedalus_labs import Dedalus, DedalusRunner
client = Dedalus(api_key="YOUR_API_KEY")
runner = DedalusRunner(client)
def get_weather(location: str) -> str:
"""किसी स्थान के लिए वर्तमान मौसम प्राप्त करें।"""
return f"The weather in {location} is sunny and 72°F"
result = runner.run(
input="What's the weather like in San Francisco?",
tools=[get_weather],
model="openai/gpt-5-nano",
max_steps=5
)
# Access result properties
print(result.final_output) # "The weather in San Francisco is sunny and 72°F"
print(result.steps_used) # e.g., 2
print(result.tools_called) # ["get_weather"]
print(result.tool_results) # [{"name": "get_weather", "result": "The weather...", "step": 1}]
Accessing Message History
import json
# Print the full conversation history
for msg in result.messages:
role = msg.get("role")
content = msg.get("content", "")
if role == "user":
print(f"User: {content}")
elif role == "assistant":
if msg.get("tool_calls"):
tools = [tc["function"]["name"] for tc in msg["tool_calls"]]
print(f"Assistant: [calling {', '.join(tools)}]")
else:
print(f"Assistant: {content}")
elif role == "tool":
print(f"Tool Result: {content[:100]}...")
# Store message history to JSON for logging/debugging
with open("conversation_log.json", "w") as f:
json.dump(result.messages, f, indent=2)
# Continue the conversation with message history
follow_up = runner.run(
messages=result.to_input_list(), # पिछला वार्तालाप पास करें
input="What about New York?", # Add new user message
tools=[get_weather],
model="openai/gpt-5-nano"
)
Example Response
{
"final_output": "The weather in San Francisco is sunny and 72°F",
"tool_results": [
{
"name": "get_weather",
"result": "The weather in San Francisco is sunny and 72°F",
"step": 1
}
],
"steps_used": 2,
"tools_called": ["get_weather"],
"messages": [
{ "role": "user", "content": "सैन फ्रांसिस्को में मौसम कैसा है?" },
{
"role": "assistant",
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"location\": \"San Francisco\"}"
}
}
]
},
{
"role": "tool",
"tool_call_id": "call_abc123",
"content": "The weather in San Francisco is sunny and 72°F"
},
{
"role": "assistant",
"content": "The weather in San Francisco is sunny and 72°F"
}
],
"intents": null
}
## चैट कम्प्लीशन
नॉन-स्ट्रीमिंग चैट कम्प्लीशन के लिए पूरा response ऑब्जेक्ट।
दिखाएं प्रॉपर्टीज़
दिखाएं प्रॉपर्टीज़
चैट कम्प्लीशन के लिए यूनिक आइडेंटिफ़ायर
ऑब्जेक्ट टाइप, हमेशा
chat.completionकम्प्लीशन बनाए जाने का Unix टाइमस्टैम्प (सेकंड में)
कम्प्लीशन के लिए उपयोग किया गया model (उदाहरण:
openai/gpt-5-nano)कम्प्लीशन चॉइसेज़ की सूची
दिखाएं चॉइस प्रॉपर्टीज़
दिखाएं चॉइस प्रॉपर्टीज़
इस चॉइस का इंडेक्स
जेनरेशन रुकने का कारण:
stop, length, tool_calls, content_filterटोकन के लिए लॉग प्रायिकता संबंधी जानकारी
परिणामों को पुन: उत्पन्न (reproduce) करने के लिए सिस्टम फिंगरप्रिंट
Example
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1677652288,
"model": "openai/gpt-5-nano",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm doing well, thank you for asking."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 12,
"total_tokens": 25
}
}
स्ट्रीमिंग completions (
stream=true) के लिए भेजे गए response chunks।दिखाएं Properties
दिखाएं Properties
चैट completion के लिए यूनिक पहचानकर्ता
ऑब्जेक्ट प्रकार, हमेशा
chat.completion.chunkवह Unix timestamp जब यह chunk बनाया गया था
उपयोग किया जा रहा model
chunk choices की सूची
दिखाएं Choice Properties
दिखाएं Choice Properties
इस choice का index
completion का कारण (केवल final chunk में):
stop, length, tool_calls, content_filter, या nullExample
{
"id": "chatcmpl-abc123",
"object": "chat.completion.chunk",
"created": 1677652288,
"model": "openai/gpt-5-nano",
"choices": [
{
"index": 0,
"delta": {
"content": "Hello"
},
"finish_reason": null
}
]
}
## एम्बेडिंग्स
एम्बेडिंग बनाने के अनुरोधों के लिए प्रतिक्रिया ऑब्जेक्ट।
दिखाएं प्रॉपर्टीज़
दिखाएं प्रॉपर्टीज़
ऑब्जेक्ट प्रकार, हमेशा
listएम्बेडिंग्स उत्पन्न करने के लिए उपयोग किया गया model
Example
{
"object": "list",
"data": [
{
"object": "embedding",
"embedding": [0.0023064255, -0.009327292, -0.0028842222],
"index": 0
}
],
"model": "openai/text-embedding-3-small",
"usage": {
"prompt_tokens": 8,
"total_tokens": 8
}
}
## मॉडल्स
उपलब्ध मॉडल्स की सूची के लिए response ऑब्जेक्ट। क्षमताओं और रूटिंग के बारे में विस्तृत मेटाडेटा शामिल होता है।
दिखाएं Properties
दिखाएं Properties
ऑब्जेक्ट प्रकार, हमेशा
listमॉडल ऑब्जेक्ट्स की सूची
दिखाएं Model Properties
दिखाएं Model Properties
प्रोवाइडर प्रीफ़िक्स के साथ मॉडल identifier (उदाहरण:
openai/gpt-4o, anthropic/claude-opus-4-5)प्रोवाइडर नाम:
openai, anthropic, google, xai, deepseek, mistral आदिवह ISO 8601 टाइमस्टैम्प जब मॉडल बनाया गया था
मानव-पठनीय डिस्प्ले नाम (वैकल्पिक)
मॉडल का विवरण (वैकल्पिक)
मॉडल की क्षमताएँ
दिखाएं Capabilities
दिखाएं Capabilities
चैट completions के माध्यम से टेक्स्ट जेनरेशन को सपोर्ट करता है
इमेज इनपुट / मल्टीमॉडल को सपोर्ट करता है
इमेज जेनरेट कर सकता है
ऑडियो इनपुट/आउटपुट को सपोर्ट करता है
tool/function calling को सपोर्ट करता है
structured JSON आउटपुट को सपोर्ट करता है
स्ट्रीमिंग responses को सपोर्ट करता है
विस्तारित reasoning को सपोर्ट करता है (उदाहरण: o1, o3, Claude thinking)
टोकन्स में अधिकतम इनपुट कॉन्टेक्स्ट विंडो
अधिकतम आउटपुट टोकन्स
Example
{
"object": "list",
"data": [
{
"id": "openai/gpt-4o",
"provider": "openai",
"created_at": "1970-01-01T00:00:00Z",
"display_name": null,
"description": null,
"capabilities": {
"text": true,
"vision": null,
"image_generation": null,
"audio": null,
"tools": null,
"structured_output": null,
"streaming": null,
"thinking": null,
"input_token_limit": null,
"output_token_limit": null
},
"provider_info": {
"status": "enabled",
"upstream_api": "openai/chat/completions"
}
},
{
"id": "openai/o1",
"provider": "openai",
"created_at": "1970-01-01T00:00:00Z",
"capabilities": {
"text": true,
"thinking": true
},
"provider_info": {
"status": "enabled",
"upstream_api": "openai/chat/completions"
}
},
{
"id": "anthropic/claude-opus-4-5",
"provider": "anthropic",
"created_at": "1970-01-01T00:00:00Z",
"capabilities": {
"text": true,
"vision": true,
"tools": true
},
"provider_info": {
"status": "enabled",
"upstream_api": "anthropic/messages"
}
}
]
}
## छवियाँ
इमेज जेनरेशन अनुरोधों के लिए रेस्पॉन्स ऑब्जेक्ट।
दिखाएं प्रॉपर्टीज़
दिखाएं प्रॉपर्टीज़
वह Unix टाइमस्टैम्प जब इमेज जेनरेट की गई थीं
जनरेट की गई इमेज ऑब्जेक्ट्स की सूची
Example
{
"created": 1677652288,
"data": [
{
"url": "https://images.example.com/abc123.png",
"revised_prompt": "A cute baby sea otter floating on its back in calm blue water"
}
]
}
## ऑडियो
ऑडियो ट्रांसक्रिप्शन अनुरोधों के लिए रिस्पॉन्स ऑब्जेक्ट।
दिखाएं प्रॉपर्टीज़
दिखाएं प्रॉपर्टीज़
ऑडियो फ़ाइल से ट्रांसक्राइब किया गया टेक्स्ट।
Example
{
"text": "Hello, this is a test of audio transcription."
}
ऑडियो ट्रांसलेशन रिक्वेस्ट के लिए रिस्पॉन्स ऑब्जेक्ट (हमेशा अंग्रेज़ी में अनुवाद करता है)।
दिखाएं Properties
दिखाएं Properties
ऑडियो फ़ाइल से प्राप्त अनूदित टेक्स्ट (अंग्रेज़ी में)
Example
{
"text": "Hello, this is a test of audio translation."
}
## त्रुटियाँ
सभी endpoints इस संरचना के साथ त्रुटियाँ लौटा सकते हैं।
दिखाएं Properties
दिखाएं Properties
त्रुटि जानकारी वाला ऑब्जेक्ट
Example
{
"error": {
"message": "अमान्य API कुंजी प्रदान की गई",
"type": "authentication_error",
"code": "invalid_api_key"
}
}