fyodorov-llm-agents 0.3.5__py3-none-any.whl → 0.3.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -72,49 +72,12 @@ class Agent(BaseModel):
72
72
  # 'rag': self.rag,
73
73
  # }
74
74
 
75
- def call_with_fn_calling_old(self, input: str = "", history = []) -> dict:
76
- litellm.set_verbose = True
77
- model = self.model
78
- # Set environmental variable
79
- if self.api_key.startswith('sk-'):
80
- os.environ["OPENAI_API_KEY"] = self.api_key
81
- self.api_url = "https://api.openai.com/v1"
82
- elif self.api_key and self.api_key != '':
83
- model = 'mistral/'+self.model
84
- os.environ["MISTRAL_API_KEY"] = self.api_key
85
- self.api_url = "https://api.mistral.ai/v1"
86
- else:
87
- print("Provider Ollama")
88
- model = 'ollama/'+self.model
89
- if self.api_url is None:
90
- self.api_url = "https://api.ollama.ai/v1"
91
-
92
- base_url = str(self.api_url)
93
- if base_url and base_url[-1] == '/':
94
- print("Removing trailing slash")
95
- base_url = base_url[:-1]
96
-
97
- messages: [] = [
98
- {"content": self.prompt, "role": "system"},
99
- *history,
100
- { "content": input, "role": "user"},
101
- ]
102
- print(f"Tools: {self.tools}")
103
- print(f"calling litellm with model {model}, messages: {messages}, max_retries: 0, history: {history}, base_url: {base_url}")
104
- response = litellm.completion(model=model, messages=messages, max_retries=0, base_url=base_url)
105
- print(f"Response: {response}")
106
- answer = response.choices[0].message.content
107
- print(f"Answer: {answer}")
108
- return {
109
- "answer": answer,
110
-
111
- }
112
-
113
75
  def call_with_fn_calling(self, input: str = "", history = []) -> dict:
114
76
  litellm.set_verbose = True
115
77
  model = self.model
116
78
  # Set environmental variable
117
79
  if self.api_key.startswith('sk-'):
80
+ model = 'openai/'+self.model
118
81
  os.environ["OPENAI_API_KEY"] = self.api_key
119
82
  self.api_url = "https://api.openai.com/v1"
120
83
  elif self.api_key and self.api_key != '':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fyodorov_llm_agents
3
- Version: 0.3.5
3
+ Version: 0.3.7
4
4
  Summary: LLM agents for the Fyodorov AI suite
5
5
  Author-email: Daniel Ransom <02masseur.alibis@icloud.com>
6
6
  Project-URL: Homepage, https://github.com/FyodorovAI/fyodorov-llm-agents
@@ -1,9 +1,9 @@
1
- fyodorov_llm_agents/agents/agent.py,sha256=5cMioJ1AbA7_aSITNm5OnzyOuVKO2GvlLFaw79PhoZI,6519
1
+ fyodorov_llm_agents/agents/agent.py,sha256=vVBCEBpG11m4ae11Mr94rF5TJpuBluI_loQPDTw734w,5044
2
2
  fyodorov_llm_agents/agents/openai.py,sha256=FA5RS7yn3JwvFA8PXju60XSYC_2oUZFNgBUzeIYtGv0,1154
3
3
  fyodorov_llm_agents/tools/mcp_tool_model.py,sha256=i7oFZReVGZsHN2K8T7mCAGF4t92wMMIR9mCkRHUgKsI,4413
4
4
  fyodorov_llm_agents/tools/mcp_tool_service.py,sha256=9tDvSdKpEAOKKU5MHImUqTOc6MZyk1hEjs3GpzgQUsk,5542
5
5
  fyodorov_llm_agents/tools/tool.py,sha256=HyOk0X_3XE23sa8J-8UZx657tJ0sxwZWMbA4OPxXU6E,7940
6
- fyodorov_llm_agents-0.3.5.dist-info/METADATA,sha256=8CP5iEUiu3Fio260KLeMNv6ExXR04vgnR2NCMTWjFiM,550
7
- fyodorov_llm_agents-0.3.5.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
8
- fyodorov_llm_agents-0.3.5.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
9
- fyodorov_llm_agents-0.3.5.dist-info/RECORD,,
6
+ fyodorov_llm_agents-0.3.7.dist-info/METADATA,sha256=gaov2jthap8Qu8luUtqUOwKrKq0PlwdZhvHO25bQRMA,550
7
+ fyodorov_llm_agents-0.3.7.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
8
+ fyodorov_llm_agents-0.3.7.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
9
+ fyodorov_llm_agents-0.3.7.dist-info/RECORD,,