-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Description
Checked other resources
- I added a very descriptive title to this issue.
- I searched the LangChain.js documentation with the integrated search.
- I used the GitHub search to find a similar question and didn't find it.
- I am sure that this is a bug in LangChain.js rather than my code.
- The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
Example Code
const retriever = SelfQueryRetriever.fromLLM({
llm: llm,
vectorStore: vectorStore,
documentContents: 'Detailed description of an apartment',
attributeInfo: attributeInfo,
structuredQueryTranslator: new SupabaseTranslator(),
verbose: true,
})
retriever.invoke("find apartments that have AC")Error Message and Stack Trace (if applicable)
Error is Data type not supported
buildColumnName(attr: string, value: string | number, includeType = true) {
let column = "";
if (isString(value)) {
column = `metadata->>${attr}`;
} else if (isInt(value)) {
column = `metadata->${attr}${includeType ? "::int" : ""}`;
} else if (isFloat(value)) {
column = `metadata->${attr}${includeType ? "::float" : ""}`;
} else {
throw new Error("Data type not supported");
}
return column;
}Description
- I am trying to use langchain library to query my Supabase DB and return results by using
selfQueryRetriever - I expect to get results based on query
- I get error if filters generated by LLM contains boolean type
I created PR to solve the bug
System Info
Node Version: v20.18.0
Yarn Version: 1.22.22
dosubot
Metadata
Metadata
Assignees
Labels
No labels