diff --git a/python/src/aiconfig/editor/client/src/LocalEditor.tsx b/python/src/aiconfig/editor/client/src/LocalEditor.tsx index b71de6ffc..1c95ba5f2 100644 --- a/python/src/aiconfig/editor/client/src/LocalEditor.tsx +++ b/python/src/aiconfig/editor/client/src/LocalEditor.tsx @@ -98,8 +98,8 @@ export default function Editor() { output_chunk: (data) => { onStream({ type: "output_chunk", data: data as Output }); }, - aiconfig: (data) => { - onStream({ type: "aiconfig", data: data as AIConfig }); + aiconfig_chunk: (data) => { + onStream({ type: "aiconfig_chunk", data: data as AIConfig }); }, stop_streaming: (_data) => { onStream({ type: "stop_streaming", data: null }); diff --git a/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx b/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx index 72910cdef..93db37ec5 100644 --- a/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx +++ b/python/src/aiconfig/editor/client/src/components/AIConfigEditor.tsx @@ -69,7 +69,7 @@ export type RunPromptStreamEvent = data: Output; } | { - type: "aiconfig"; + type: "aiconfig_chunk"; data: AIConfig; } | { @@ -636,7 +636,7 @@ export default function EditorContainer({ id: promptId, output: event.data, }); - } else if (event.type === "aiconfig") { + } else if (event.type === "aiconfig_chunk") { // Next PR: Change this to aiconfig_stream to make it more obvious // and make STREAM_AICONFIG it's own event so we don't need to pass // the `isRunning` state to set. See Ryan's comments about this in diff --git a/python/src/aiconfig/editor/server/server.py b/python/src/aiconfig/editor/server/server.py index f325b9811..6ac905f9a 100644 --- a/python/src/aiconfig/editor/server/server.py +++ b/python/src/aiconfig/editor/server/server.py @@ -348,7 +348,7 @@ def kill_thread(thread_id: int | None): aiconfig_json = aiconfig.model_dump(exclude=EXCLUDE_OPTIONS) if aiconfig is not None else None yield "[" - yield json.dumps({"aiconfig": aiconfig_json}) + yield json.dumps({"aiconfig_chunk": aiconfig_json}) yield "]" yield "["