-
Notifications
You must be signed in to change notification settings - Fork 237
GPT-OSS less strict parser, allow for function calls in analysis channel #3786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a983ee9
0521c64
3f19387
eae94c4
532a131
818b020
afc263b
a9fc73f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -86,9 +86,11 @@ std::optional<rapidjson::Document> GptOssToolParser::parseChunk(const std::strin | |
| std::string chunk = newChunk; | ||
| std::optional<rapidjson::Document> result; | ||
|
|
||
| if (chunk.find(getParsingStartTags()[0]) != std::string::npos) { | ||
| toolCallIndex++; // starting with -1, first call will be 0 | ||
| return std::nullopt; | ||
| for (const auto& parsingStartTag : getParsingStartTags()) { | ||
| if (chunk.find(parsingStartTag) != std::string::npos) { | ||
| toolCallIndex++; // starting with -1, first call will be 0 | ||
| return std::nullopt; | ||
| } | ||
| } | ||
|
Comment on lines
+89
to
94
|
||
|
|
||
| // This should only happen during channel read if model does not produce garbage | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment. For GenAI/OV testing purposes it could be useful to be able to turn off such workarounds, to check accuracy fixes, otherwise we may just mask those issues