Skip to content

Add filterset endpoint

Laurian Gridinoc requested to merge function-call-sample into main

Sample function call exposed as /filterset, code in api/filterset.py -- uses a relaxed filter parameters definition in JSON (as a single function/tool) to return the possible arguments for each parameter/filter

Note: regular function/tool call takes user query, generates the call arguments, calls the function/tool and returns the result to the LLM to interpret it. Here we stop at generating call arguments.

See README on how to run it.

Default is using OpenAI, so it requires a valid OpenAI API key. It can also be used with a compatible OpenAI API endpoint and function running model such as Hermes 2 Pro Mistral:

  1. Run Hermes 2 Pro Mistral docker run -ti -p 8080:8080 localai/localai:v2.11.0-ffmpeg-core hermes-2-pro-mistral
  2. add OPENAI_API_BASE=http://localhost:8080/v1 to .env.local
  3. run make run as in the README
Edited by James Vasile

Merge request reports