Browse Source

dev: allow specifying chat driver in puter.js

KernelDeimos 1 month ago
parent
commit
64d1b6e663
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/puter-js/src/modules/AI.js

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

@@ -343,6 +343,10 @@ class AI{
         if(settings.stream !== undefined && typeof settings.stream === 'boolean'){
         if(settings.stream !== undefined && typeof settings.stream === 'boolean'){
             options.stream = settings.stream;
             options.stream = settings.stream;
         }
         }
+        
+        if ( settings.driver ) {
+            driver = settings.driver;
+        }
 
 
         // settings to pass
         // settings to pass
         const SETTINGS_TO_PASS = ['tools', 'response'];
         const SETTINGS_TO_PASS = ['tools', 'response'];