Add dedicated Python goal operations

This commit is contained in:
Ahmed Ibrahim
2026-06-08 12:07:38 -07:00
parent 05704377c3
commit e502792f49
13 changed files with 375 additions and 258 deletions
+2 -4
View File
@@ -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)
+1 -1
View File
@@ -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)