-
Notifications
You must be signed in to change notification settings - Fork 164
fix: parse Gemma 4 <thought> reasoning tags alongside <think> #324
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
999ce64
ae1a395
7d66f89
f24b964
63c1066
c7e3a5a
3711c0d
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 |
|---|---|---|
|
|
@@ -118,7 +118,7 @@ export abstract class BaseOpenAiCompatibleProvider<ModelName extends string> | |
| const stream = await this.createStream(systemPrompt, messages, metadata) | ||
|
|
||
| const matcher = new TagMatcher( | ||
| "think", | ||
| ["think", "thought"], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. // class TagMatcher
constructor(
tagName: string | string[],
readonly transform?: (chunks: TagMatcherResult) => Result,
readonly position = 0,
) {
this.tagNames = Array.isArray(tagName) ? tagName : [tagName]
}should not matter I guess |
||
| (chunk) => | ||
| ({ | ||
| type: chunk.matched ? "reasoning" : "text", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.