LocalAI/core/http/endpoints/openai
Ettore Di Giacinto cf747bcdec
feat: extract output with regexes from LLMs (#3491)
* feat: extract output with regexes from LLMs

This changset adds `extract_regex` to the LLM config. It is a list of
regexes that can match output and will be used to re extract text from
the LLM output. This is particularly useful for LLMs which outputs final
results into tags.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Add tests, enhance output in case of configuration error

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
2024-09-13 13:27:36 +02:00
..
assistant_test.go docs(swagger): core more localai/openai endpoints (#2904) 2024-07-18 00:38:41 -04:00
assistant.go docs(swagger): core more localai/openai endpoints (#2904) 2024-07-18 00:38:41 -04:00
chat.go feat: extract output with regexes from LLMs (#3491) 2024-09-13 13:27:36 +02:00
completion.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00
edit.go docs(swagger): core more localai/openai endpoints (#2904) 2024-07-18 00:38:41 -04:00
embeddings.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00
files_test.go docs(swagger): core more localai/openai endpoints (#2904) 2024-07-18 00:38:41 -04:00
files.go docs(swagger): core more localai/openai endpoints (#2904) 2024-07-18 00:38:41 -04:00
image.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00
inference.go chore: fix go.mod module (#2635) 2024-06-23 08:24:36 +00:00
list.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00
request.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00
transcription.go feat(model-list): be consistent, skip known files from listing (#2760) 2024-07-10 15:28:39 +02:00