-
Notifications
You must be signed in to change notification settings - Fork 785
feat: add thinking parameter to OllamaChatCompleteConfig #1415
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -74,6 +74,15 @@ export const OllamaChatCompleteConfig: ProviderConfig = { | |||||||||||||||||||||||||||||||||||||
| tools: { | ||||||||||||||||||||||||||||||||||||||
| param: 'tools', | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| think: { | ||||||||||||||||||||||||||||||||||||||
| param: 'thinking', | ||||||||||||||||||||||||||||||||||||||
| transform: (params: Params) => { | ||||||||||||||||||||||||||||||||||||||
| if (params.thinking?.type === 'disabled') { | ||||||||||||||||||||||||||||||||||||||
| return false; | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| return true; | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+77
to
+85
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. 🟡 Type Safety Issue: The Fix: Ensure the Impact: Prevents TypeScript compilation errors and ensures type safety at compile time
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| export interface OllamaChatCompleteResponse extends ChatCompletionResponse { | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
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.
this would mean
think -> gets mapped to -> thinking
you probably are trying to do the opposite
you should do