|
|
|
|
|
by misterdata
1097 days ago
|
|
As they are accepting a JSON schema for the function calls, it is likely they are using token biasing based on the schema (using some kind of state machine that follows along with the tokens and only allows the next token to be a valid one given the grammar/schema). I have successfully implemented this for JSON Schema (limited subset) on llama.cpp. See also e.g. this implementation: https://github.com/1rgs/jsonformer |
|
[1] https://github.com/newhouseb/clownfish
[2] https://platform.openai.com/docs/guides/gpt/function-calling