Gigachat 3 tool parser and tests#17924
Conversation
|
We should start transitioning to the PEG parser approach. This one looks very similar to the new mistral-3 series, there is already a parser out there to reference. The difference is you'll need to match the name within the JSON instead of outside of it, but it should be easy with the |
|
Got it, thanks, I took it to work) |
3a451fc to
37fa336
Compare
|
Rebased onto latest master |
|
Any updates? |
pwilkin
left a comment
There was a problem hiding this comment.
Okay, think this should be fine.
|
Running CI after rebasing on master and will merge if it's OK. |
Sorry, but model has "<|role_sep|>\n" and "<|message_sep|>\n\n" as tokens -> so newlines are the part of these special tokens Is there still need to remove \n here? |
|
Oh wow. Okay, nevermind, you're right. Those are some crazy tokens :) Yeah, that has to be reverted. Can you please fix the merge as well? I think I might've messed up something, can't really check now. |
4dac5ba to
6659614
Compare
This PR adds a tool parser for parsing the function calls made by the Gigachat 3 models.
Models can generate only one function call using format:
{text}<|message_sep|>\n\nfunction call<|role_sep|>\n{json}Where
<|message_sep|>\n\nand<|role_sep|>\nare special tokens.