mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +00:00
feat(functions): allow response_regex
to be a list (#2447)
feat(functions): allow regex match to be a list Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
ff8a6962cd
commit
5d31e5269d
3 changed files with 19 additions and 16 deletions
|
@ -93,8 +93,9 @@ parameters:
|
|||
function:
|
||||
# set to true to not use grammars
|
||||
no_grammar: true
|
||||
# set a regex to extract the function tool arguments from the LLM response
|
||||
response_regex: "(?P<function>\w+)\s*\((?P<arguments>.*)\)"
|
||||
# set one or more regexes used to extract the function tool arguments from the LLM response
|
||||
response_regex:
|
||||
- "(?P<function>\w+)\s*\((?P<arguments>.*)\)"
|
||||
```
|
||||
|
||||
The response regex have to be a regex with named parameters to allow to scan the function name and the arguments. For instance, consider:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue