fyodorov-llm-agents 0.3.6__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,50 +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
- model = 'openai/'+self.model
81
- os.environ["OPENAI_API_KEY"] = self.api_key
82
- self.api_url = "https://api.openai.com/v1"
83
- elif self.api_key and self.api_key != '':
84
- model = 'mistral/'+self.model
85
- os.environ["MISTRAL_API_KEY"] = self.api_key
86
- self.api_url = "https://api.mistral.ai/v1"
87
- else:
88
- print("Provider Ollama")
89
- model = 'ollama/'+self.model
90
- if self.api_url is None:
91
- self.api_url = "https://api.ollama.ai/v1"
92
-
93
- base_url = str(self.api_url)
94
- if base_url and base_url[-1] == '/':
95
- print("Removing trailing slash")
96
- base_url = base_url[:-1]
97
-
98
- messages: [] = [
99
- {"content": self.prompt, "role": "system"},
100
- *history,
101
- { "content": input, "role": "user"},
102
- ]
103
- print(f"Tools: {self.tools}")
104
- print(f"calling litellm with model {model}, messages: {messages}, max_retries: 0, history: {history}, base_url: {base_url}")
105
- response = litellm.completion(model=model, messages=messages, max_retries=0, base_url=base_url)
106
- print(f"Response: {response}")
107
- answer = response.choices[0].message.content
108
- print(f"Answer: {answer}")
109
- return {
110
- "answer": answer,
111
-
112
- }
113
-
114
75
  def call_with_fn_calling(self, input: str = "", history = []) -> dict:
115
76
  litellm.set_verbose = True
116
77
  model = self.model
117
78
  # Set environmental variable
118
79
  if self.api_key.startswith('sk-'):
80
+ model = 'openai/'+self.model
119
81
  os.environ["OPENAI_API_KEY"] = self.api_key
120
82
  self.api_url = "https://api.openai.com/v1"
121
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.6
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=EM4uq94_S3ZYH6aLT7iYu-FeIfc6VpkiuxXgQhp1lug,6560
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.6.dist-info/METADATA,sha256=3dd7l6yvr2CzMVTwFvDrZFcgnBTZw8PlEiJt3gmfosg,550
7
- fyodorov_llm_agents-0.3.6.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
8
- fyodorov_llm_agents-0.3.6.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
9
- fyodorov_llm_agents-0.3.6.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,,