mirror of
https://github.com/openai/codex.git
synced 2026-12-06 01:10:58 +00:00
Accept string input for Python turns
This commit is contained in:
@@ -9,12 +9,12 @@ from _bootstrap import ensure_local_sdk_src, runtime_config
|
||||
|
||||
ensure_local_sdk_src()
|
||||
|
||||
from openai_codex import Codex, TextInput
|
||||
from openai_codex import Codex
|
||||
|
||||
with Codex(config=runtime_config()) as codex:
|
||||
thread = codex.thread_start(model="gpt-5.4", config={"model_reasoning_effort": "high"})
|
||||
first = thread.turn(TextInput("One sentence about structured planning.")).run()
|
||||
second = thread.turn(TextInput("Now restate it for a junior engineer.")).run()
|
||||
first = thread.turn("One sentence about structured planning.").run()
|
||||
second = thread.turn("Now restate it for a junior engineer.").run()
|
||||
|
||||
reopened = codex.thread_resume(thread.id)
|
||||
listing_active = codex.thread_list(limit=20, archived=False)
|
||||
@@ -30,10 +30,10 @@ with Codex(config=runtime_config()) as codex:
|
||||
model="gpt-5.4",
|
||||
config={"model_reasoning_effort": "high"},
|
||||
)
|
||||
resumed_result = resumed.turn(TextInput("Continue in one short sentence.")).run()
|
||||
resumed_result = resumed.turn("Continue in one short sentence.").run()
|
||||
|
||||
forked = codex.thread_fork(unarchived.id, model="gpt-5.4")
|
||||
forked_result = forked.turn(TextInput("Take a different angle in one short sentence.")).run()
|
||||
forked_result = forked.turn("Take a different angle in one short sentence.").run()
|
||||
|
||||
compact_result = unarchived.compact()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user