Giter VIP home page Giter VIP logo

Comments (3)

izellevy avatar izellevy commented on August 26, 2024

Hi @DataVigi, you did not clarify which endpoint you wish to add this functionality but I am assuming it is either chat/completions or context/query route. If it was for /chat/completions route, adding metadata would break the compatibility with the existing OpenAI compatible clients. We want to be fully compatible in order to ease the transition for our users. If it was for the context/query endpoint, then you can attach the metadata filter to each query you send. Having said that we also have another way of overriding the global_metadata_filter using the config. (context_engine/params/global_metadata_filter).

In any case I would be glad to know more about your use-case and let's examine whether it is solvable with the existing functionality.

from canopy.

igiloh-pinecone avatar igiloh-pinecone commented on August 26, 2024

@DataVigi As @izellevy has mentioned, in a chat mode you can set a global metadata filter for all queries, using the Canopy config. That's on top of the /context/query API that supports passing a filter for every individual query.

If you want the the ChatBot to dynamically "decide" on a metadata filter according to chat conversation contents - either by LLM reasoning or by pre-defined logic - this is the responsibility of the QueryGenerator.
You can either modify the prompt of the query generator in the config file, or you can also derive a new QueryGenerator class and add your logic there.

from canopy.

coreation avatar coreation commented on August 26, 2024

Hey @igiloh-pinecone how would making a custom query generator entail exactly? That would mean making a class based on the QueryGenerator class, but how could that be then configured so that the chatengine for example uses the configured one? I can't seem to find any information on how that sort plugin system would work... Happy to contribute to the docs!

from canopy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.