Skip to content

Commit

Permalink
fix tool type to be TTool instead of string
Browse files Browse the repository at this point in the history
  • Loading branch information
krishokr committed Sep 24, 2024
1 parent e43ca5e commit b31d822
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function CreateAssistant() {
(tool) => tool.type === RetrievalType,
);
const retrievalTools = [retrievalTool];
const containsCodeInterpreter = tools.includes("Code interpretor");
// const containsCodeInterpreter = tools.includes("Code interpretor");
// if (containsCodeInterpreter) retrievalTools.push("Code interpreter");
form.setValue("config.configurable.tools", retrievalTools);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ function EditAssistantForm({
const retrievalTool = availableTools?.find(
(tool) => tool.type === RetrievalType,
);
const containsCodeInterpreter = tools.includes("Code interpretor");
// const containsCodeInterpreter = tools.includes("Code interpretor");
// if (containsCodeInterpreter) retrievalTools.push("Code interpreter");
if (retrievalTool) {
form.setValue("config.configurable.tools", [retrievalTool.toString()]);
form.setValue("config.configurable.tools", [retrievalTool]);
}
}
}, [architectureType]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export default function FilesDialog({ form, classNames }: TFilesDialog) {
defaultValues={formattedAssistantFiles}
onValueChange={(selections) => {
const fileIds = getFileIds(selections);
console.log(fileIds);
field.onChange(fileIds);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/data-provider/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export type TConfigurable = {
interrupt_before_action: boolean;
retrieval_description: string;
system_message: string;
tools: string[];
tools: TTool[];
llm_type: string;
};

Expand Down

0 comments on commit b31d822

Please sign in to comment.