[Python] Langchain Self-Query: use a numeric value: integer, float, double, long. Value...

Discussão em 'Python' iniciado por Stack, Maio 20, 2025.

  1. Stack

    Stack Membro Participativo

    I'm currently using Langchain's Self-Querying Retriever functionality to extract relevant filter criteria from natural language queries and retriever based on those filters. I've had success with all sorts of strings, including and/or situations. However, I'm having issues when trying to query with any sort of date limitation. I have a UI built where I'm passing a date range, but also users can query such as "give me all home listings from the last year". Currently, I'm testing with a single date in YYYY-MM-DD format and getting the below error:

    'Response content b\\\'{"error_code":"BAD_REQUEST","message":"Please use a numeric value: integer, float, double, long. Value Map(date -> 2023-03-01, type -> date) is unsupported for operator >=."


    My "date" field is of "date" datatype, which clearly is not accepted here. Does anyone know of a way to get a date filter to work? Would conversion to epoch/unix but I'm unsure if that would work.

    Continue reading...

Compartilhe esta Página