diff --git a/backend/app/agent.py b/backend/app/agent.py index 6a8103ad..23ea62a3 100644 --- a/backend/app/agent.py +++ b/backend/app/agent.py @@ -268,7 +268,7 @@ def __init__( ) .configurable_alternatives( ConfigurableField(id="type", name="Bot Type"), - default_key="assistant", + default_key="agent", prefix_keys=True, chatbot=chatbot, chat_retrieval=chat_retrieval, diff --git a/backend/app/checkpoint.py b/backend/app/checkpoint.py index 5013b3b6..f1589101 100644 --- a/backend/app/checkpoint.py +++ b/backend/app/checkpoint.py @@ -71,8 +71,11 @@ def get(self, config: RunnableConfig) -> Checkpoint | None: value.pop("__pregel_version") value.pop("__pregel_ts") checkpoint = empty_checkpoint() - checkpoint["channel_values"] = value - for key in value: + if value.get("messages"): + checkpoint["channel_values"] = {"__root__": value["messages"][1]} + else: + checkpoint["channel_values"] = {} + for key in checkpoint["channel_values"]: checkpoint["channel_versions"][key] = 1 return checkpoint else: diff --git a/frontend/src/components/Config.tsx b/frontend/src/components/Config.tsx index 213e12bb..d1dad7c5 100644 --- a/frontend/src/components/Config.tsx +++ b/frontend/src/components/Config.tsx @@ -321,8 +321,8 @@ export function Config(props: { }, [props.config, props.configDefaults]); useEffect(() => { if (dropzone.acceptedFiles.length > 0) { - if (typeValue === "assistant") { - const toolsKey = "type==assistant/tools"; + if (typeValue === "agent") { + const toolsKey = "type==agent/tools"; setValues((values) => ({ configurable: { ...values?.configurable, diff --git a/frontend/src/components/ConfigList.tsx b/frontend/src/components/ConfigList.tsx index 857a39c3..071e04f2 100644 --- a/frontend/src/components/ConfigList.tsx +++ b/frontend/src/components/ConfigList.tsx @@ -36,8 +36,8 @@ function ConfigItem(props: { { TYPES[ (props.config.config.configurable?.type ?? - "assistant") as keyof typeof TYPES - ].title + "agent") as keyof typeof TYPES + ]?.title } diff --git a/frontend/src/constants.ts b/frontend/src/constants.ts index 4a655202..67835899 100644 --- a/frontend/src/constants.ts +++ b/frontend/src/constants.ts @@ -1,6 +1,6 @@ export const TYPES = { - assistant: { - id: "assistant", + agent: { + id: "agent", title: "Assistant", description: "These GPTs can use an arbitrary number of tools, and you can give them arbitrary instructions. The LLM itself is responsible for deciding which tools to call and how many times to call them. This makes them super powerful and flexible, but they can be unreliable at times! As such, only a subset of the most performant models work with these.",