8000 use localmodel with openai format does not work · Issue #118 · openai/openai-agents-python · GitHub
[go: up one dir, main page]

Skip to content
use localmodel with openai format does not work #118
Open
@litaolaile

Description

@litaolaile

Please read this first

  • Have you read the docs?Agents SDK docs
  • Have you searched for related issues? Others may have faced similar issues.

Describe the bug

code runs output nothing

Debug information

  • Agents SDK version: openai-agents-0.0.3
  • Python version : Python 3.10

Repro steps

my code 【
from agents import OpenAIChatCompletionsModel, Agent, ModelSettings, Runner
from openai import AsyncOpenAI

external_client = AsyncOpenAI(
api_key="*******",
base_url="https://api.deepseek.com/v1/",
)

chinese_agent = Agent(
name="chinese agent",
instructions="only speak chinese.",
model=OpenAIChatCompletionsModel(
model="deepseek-chat",
openai_client=external_client,
),
model_settings=ModelSettings(temperature=0.5),
)

triage_agent = Agent(
name="Triage agent",
instructions="Handoff to the appropriate agent based on the language of the request.",
handoffs=[chinese_agent],
model=OpenAIChatCompletionsModel(
model="deepseek-chat",
openai_client=external_client,
),
model_settings=ModelSettings(temperature=0.5),
)

async def main():
result = await Runner.run(triage_agent, input="Hola, ¿cómo estás?")
print(result.final_output)

Expected behavior

A clear and concise description of what you expected to happen.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-more-infoWaiting for a reply/more info from the author

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0