Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backwards compat #147

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/app/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 5 additions & 2 deletions backend/app/checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ConfigList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/constants.ts
Original file line number Diff line number Diff line change
@@ -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.",
Expand Down
Loading