mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
Tag InputItem (#2304)
Instead of:
```
{ Text: { text: string } }
```
It is now:
```
{ type: "text", data: { text: string } }
```
which makes for cleaner discriminated unions
This commit is contained in:
@@ -144,6 +144,7 @@ pub struct RemoveConversationListenerParams {
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[serde(tag = "type", content = "data")]
|
||||
pub enum InputItem {
|
||||
Text {
|
||||
text: String,
|
||||
|
||||
Reference in New Issue
Block a user