chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import asyncio
|
||||
|
||||
from openai.types.shared import Reasoning
|
||||
|
||||
from agents import Agent, ModelSettings, Runner
|
||||
|
||||
# If you have a certain reason to use Chat Completions, you can configure the model this way,
|
||||
# and then you can pass the chat_completions_model to the Agent constructor.
|
||||
# from openai import AsyncOpenAI
|
||||
# client = AsyncOpenAI()
|
||||
# from agents import OpenAIChatCompletionsModel
|
||||
# chat_completions_model = OpenAIChatCompletionsModel(model="gpt-5.6-sol", openai_client=client)
|
||||
|
||||
|
||||
async def main():
|
||||
agent = Agent(
|
||||
name="Knowledgable GPT-5 Assistant",
|
||||
instructions="You're a knowledgable assistant. You always provide an interesting answer.",
|
||||
model="gpt-5.6-sol",
|
||||
model_settings=ModelSettings(
|
||||
reasoning=Reasoning(effort="low"), # "none", "low", "medium", "high", "xhigh"
|
||||
verbosity="low", # "low", "medium", "high"
|
||||
),
|
||||
)
|
||||
result = await Runner.run(agent, "Tell me something about recursion in programming.")
|
||||
print(result.final_output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(main())
|
||||
Reference in New Issue
Block a user