-
Notifications
You must be signed in to change notification settings - Fork 383
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
2 new API's, and Reasoning model support #423
base: main
Are you sure you want to change the base?
Conversation
Uploaded the changes to mindcraft that allows Gemini thinking models, and glhf.chat and hyperbolic api's
Add Deepseek-R1 Support. Deepseek-R1 uses "<think> [Thoughts] </think>" and the response can be cut short if it reasons through a command and it's syntax, so we cut it short before returning the response.
Added deepseek-r1 support
Added Deepseek-R1 support, such as the qwen2.5 32b distill
Changes made: |
Fixed small error that would endlessly retry groqcloud response if Deepseek-R1 was chosen
I'm getting "SyntaxError: Unexpected token 'else'" (line 60 of prompter.js). Here are lines 50-81, src/agent/prompter.js.
The line |
Removed custom logging
Fixed bug in prompter.js where replicate Ai was checked twice
sorry, I just did a refactor to models/prompter and gemini specifically. if you merge with main I will take a look |
Add files via upload
Boom, I fixed all of the merge issues and this should now be up to date! |
In
Perhaps you could add a patch that changed v1 to v1beta in |
Thanks for reminding me! I will fix that ASAP |
Made it so the endpoint for Gemini models is now v1beta instead of v1, allowing access to all new models
Okay, I added the patch file to the code repository |
Fixed the Gemini 2.0 patch
Fixed Local Model usage with reasoning
Fixed the reasoning handling for some models, and fixed the google patch |
This Pull Request is fully ready to be merged to the latest version. |
src/models/prompter.js
Outdated
@@ -129,6 +131,10 @@ export class Prompter { | |||
model_profile.api = 'mistral'; | |||
else if (profile.model.includes("groq/") || profile.model.includes("groqcloud/")) | |||
profile.api = 'groq'; | |||
else if (chat.model.includes('hf:')) |
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.
I'm getting an error here. Does chat need to be "profile" here?
MindServer running on port 8080
Client connected
Registering agents: andy
Agents registered
Starting agent with profile: ./andy.json
Starting agent initialization with profile: ./andy.json
Initializing action manager...
Initializing prompter...
Agent start failed with error
[ReferenceError: chat is not defined
at Prompter._selectAPI (file:///D:/Games/Minecraft/ai/src/mindcraft/src/models/prompter.js:134:18)
at new Prompter (file:///D:/Games/Minecraft/ai/src/mindcraft/src/models/prompter.js:59:39)
at Agent.start (file:///D:/Games/Minecraft/ai/src/mindcraft/src/agent/agent.js:33:29)
at file:///D:/Games/Minecraft/ai/src/mindcraft/src/process/init_agent.js:58:21
at file:///D:/Games/Minecraft/ai/src/mindcraft/src/process/init_agent.js:64:3
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:547:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:98:5)]
Failed to start agent process:
[ReferenceError: chat is not defined
at Prompter._selectAPI (file:///D:/Games/Minecraft/ai/src/mindcraft/src/models/prompter.js:134:18)
at new Prompter (file:///D:/Games/Minecraft/ai/src/mindcraft/src/models/prompter.js:59:39)
at Agent.start (file:///D:/Games/Minecraft/ai/src/mindcraft/src/agent/agent.js:33:29)
at file:///D:/Games/Minecraft/ai/src/mindcraft/src/process/init_agent.js:58:21
at file:///D:/Games/Minecraft/ai/src/mindcraft/src/process/init_agent.js:64:3
at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
at async onImport.tracePromise.proto (node:internal/modules/esm/loader:547:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:98:5)]
Agent process exited with code 1 and signal null
Agent process ./andy.json exited too quickly and will not be restarted.
Fixed chat.model typos
Fixed the typos in prompter.js, should be working now |
Fixed prompting for Embedding models
Fixed a minor error in the patch file for Gemini 2.0 models
Just reviewed the current Pull Request, and everything works, it is now, guaranteed to be ready to be merged |
Adds 2 new API's, a fix for googles latest models, and a fix for Deepseek-R1 support.
GLHF.chat was free, and can host models from huggingface, Hyperbolic Is free and hosts hand-picked models, like Deepseek-R1
Google released Gemini-2.0-flash-thinking, which wasn't supported by the old gemini.js file.
Deepseek-R1 uses specific reasoning tags ( and ) Which needs a specific method so the commands the model is reasoning with does not become part of the response.