mirror of
https://github.com/openai/codex.git
synced 2026-11-08 20:40:33 +00:00
Add dedicated Python goal operations
This commit is contained in:
@@ -17,10 +17,8 @@ from openai_codex import AsyncCodex
|
||||
async def main() -> None:
|
||||
async with AsyncCodex(config=runtime_config()) as codex:
|
||||
thread = await codex.thread_start()
|
||||
result = await thread.run(
|
||||
"Improve the benchmark coverage in this repository.",
|
||||
goal=True,
|
||||
)
|
||||
goal = await thread.start_goal("Improve the benchmark coverage in this repository.")
|
||||
result = await goal.run()
|
||||
print(result.final_response)
|
||||
|
||||
|
||||
|
||||
@@ -13,5 +13,5 @@ from openai_codex import Codex
|
||||
|
||||
with Codex(config=runtime_config()) as codex:
|
||||
thread = codex.thread_start()
|
||||
result = thread.run("Improve the benchmark coverage in this repository.", goal=True)
|
||||
result = thread.run_goal("Improve the benchmark coverage in this repository.")
|
||||
print(result.final_response)
|
||||
|
||||
Reference in New Issue
Block a user