mirror of
https://github.com/openai/codex.git
synced 2026-05-23 20:44:50 +00:00
Accept string input for Python turns
This commit is contained in:
@@ -13,7 +13,6 @@ import asyncio
|
||||
|
||||
from openai_codex import (
|
||||
AsyncCodex,
|
||||
TextInput,
|
||||
)
|
||||
from openai_codex.types import (
|
||||
ThreadTokenUsageUpdatedNotification,
|
||||
@@ -51,7 +50,7 @@ async def main() -> None:
|
||||
if user_input in {"/exit", "/quit"}:
|
||||
break
|
||||
|
||||
turn = await thread.turn(TextInput(user_input))
|
||||
turn = await thread.turn(user_input)
|
||||
usage = None
|
||||
status = None
|
||||
error = None
|
||||
|
||||
@@ -11,7 +11,6 @@ ensure_local_sdk_src()
|
||||
|
||||
from openai_codex import (
|
||||
Codex,
|
||||
TextInput,
|
||||
)
|
||||
from openai_codex.types import (
|
||||
ThreadTokenUsageUpdatedNotification,
|
||||
@@ -46,7 +45,7 @@ with Codex(config=runtime_config()) as codex:
|
||||
if user_input in {"/exit", "/quit"}:
|
||||
break
|
||||
|
||||
turn = thread.turn(TextInput(user_input))
|
||||
turn = thread.turn(user_input)
|
||||
usage = None
|
||||
status = None
|
||||
error = None
|
||||
|
||||
Reference in New Issue
Block a user