Procházet zdrojové kódy

dev: enable tool use for Claude

KernelDeimos před 4 měsíci
rodič
revize
1fde01aa04
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      src/puter-js/src/modules/AI.js

+ 9 - 0
src/puter-js/src/modules/AI.js

@@ -237,6 +237,9 @@ class AI{
         if ( options.model === 'groq' ) {
             options.model = 'llama3-8b-8192';
         }
+        if ( options.model === 'deepseek' ) {
+            options.model = 'deepseek-chat';
+        }
 
         // map model to the appropriate driver
         if (!options.model || options.model === 'gpt-4o' || options.model === 'gpt-4o-mini') {
@@ -270,6 +273,12 @@ class AI{
         }else if(options.model === 'grok-beta') {
             driver = 'xai';
         }
+        else if(
+            options.model === 'deepseek-chat' ||
+            options.model === 'deepseek-reasoner'
+        ){
+            driver = 'deepseek';
+        }
 
         // stream flag from settings
         if(settings.stream !== undefined && typeof settings.stream === 'boolean'){