vallurimahanth commited on
Commit
5016ba2
·
verified ·
1 Parent(s): b090105

Update core_agent.py

Browse files
Files changed (1) hide show
  1. core_agent.py +6 -1
core_agent.py CHANGED
@@ -15,6 +15,11 @@ import re
15
  import json
16
  import requests
17
  from urllib.parse import urlparse
 
 
 
 
 
18
 
19
  @tool
20
  def save_and_read_file(content: str, filename: Optional[str] = None) -> str:
@@ -337,7 +342,7 @@ class GAIAAgent:
337
 
338
  self.agent = CodeAgent(
339
  tools=self.tools,
340
- model=self.model,
341
  additional_authorized_imports=self.imports,
342
  executor_type=executor_type,
343
  executor_kwargs=executor_kwargs,
 
15
  import json
16
  import requests
17
  from urllib.parse import urlparse
18
+ # Load model directly
19
+ from transformers import AutoTokenizer, AutoModelForCausalLM
20
+
21
+ tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
22
+ modelMistral = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
23
 
24
  @tool
25
  def save_and_read_file(content: str, filename: Optional[str] = None) -> str:
 
342
 
343
  self.agent = CodeAgent(
344
  tools=self.tools,
345
+ model=modelMistral,
346
  additional_authorized_imports=self.imports,
347
  executor_type=executor_type,
348
  executor_kwargs=executor_kwargs,