-
Notifications
You must be signed in to change notification settings - Fork 710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The output panel shows "Request failed" after the task is completed #157
Comments
Code and OutputCodefrom agents import Agent, Runner, AsyncOpenAI, OpenAIChatCompletionsModel, set_default_openai_client, trace
import asyncio
vllm_client = AsyncOpenAI(
api_key="EMPTY",
base_url="http://121.61.42.5:7744/v1"
)
set_default_openai_client(vllm_client)
async def conversation_agent():
agent = Agent(
name="ConversationAgent",
model=OpenAIChatCompletionsModel(
model="qwen",
openai_client=vllm_client,
),
instructions="Please answer the questions very concisely in an American context."
)
result = await Runner.run(agent, input="Where is Central Park located?")
print(result.final_output)
new_input = result.to_input_list() + [
{"role": "user", "content": "Please describe the lifestyle in New York City."},
]
result = await Runner.run(agent, input=new_input)
print(result.final_output)
if __name__ == "__main__":
asyncio.run(conversation_agent()) ###Output: Central Park is located in Manhattan, New York City. New York City lifestyle is fast-paced, diverse, and energetic. It combines bustling streets, endless entertainment, world-class cuisine, and a 24-hour subway. Residents often prioritize career and social life, embracing the city’s vibrant cultural scene and varied neighborhoods. Request failed: [Errno 101] Network is unreachable Request failed: [Errno 101] Network is unreachable Request failed: [Errno 101] Network is unreachable Max retries reached, giving up on this batch. |
from agents import set_tracing_disabled
set_tracing_disabled(True)
or
with trace("test"):
await Runner.run(agent, input="Where is Central Park located?")
...... read the doc https://openai.github.io/openai-agents-python/config/ |
Thanks, I used set_tracing_disabled(True) to solve the problem, but using trace("test") alone still causes the same issue |
|
Please read this first
Question
The model is started using vllm, and the task uses to_input_list. After the task is completed, it still outputs Request failed.
The text was updated successfully, but these errors were encountered: