fyodorov-llm-agents 0.2.130__py3-none-any.whl → 0.2.132__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.
- fyodorov_llm_agents/agents/agent.py +11 -8
- {fyodorov_llm_agents-0.2.130.dist-info → fyodorov_llm_agents-0.2.132.dist-info}/METADATA +1 -1
- fyodorov_llm_agents-0.2.132.dist-info/RECORD +7 -0
- fyodorov_llm_agents-0.2.130.dist-info/RECORD +0 -7
- {fyodorov_llm_agents-0.2.130.dist-info → fyodorov_llm_agents-0.2.132.dist-info}/WHEEL +0 -0
- {fyodorov_llm_agents-0.2.130.dist-info → fyodorov_llm_agents-0.2.132.dist-info}/top_level.txt +0 -0
@@ -87,10 +87,13 @@ class Agent(BaseModel):
|
|
87
87
|
else:
|
88
88
|
print("Provider Ollama")
|
89
89
|
model = 'ollama/'+self.model
|
90
|
-
if self.api_url
|
91
|
-
self.api_url =
|
92
|
-
|
93
|
-
|
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]
|
94
97
|
|
95
98
|
messages: [] = [
|
96
99
|
{"content": self.prompt, "role": "system"},
|
@@ -100,11 +103,11 @@ class Agent(BaseModel):
|
|
100
103
|
print(f"Tools: {self.tools}")
|
101
104
|
tools = [tool.get_function() for tool in self.tools]
|
102
105
|
if tools and litellm.supports_function_calling(model=model):
|
103
|
-
print(f"calling litellm with model {model}, tools: {tools}, messages: {messages}, max_retries: 0, history: {history}, base_url: {
|
104
|
-
response = litellm.completion(model=model, messages=messages, max_retries=0, tools=tools, tool_choice="auto", base_url=
|
106
|
+
print(f"calling litellm with model {model}, tools: {tools}, messages: {messages}, max_retries: 0, history: {history}, base_url: {base_url}")
|
107
|
+
response = litellm.completion(model=model, messages=messages, max_retries=0, tools=tools, tool_choice="auto", base_url=base_url)
|
105
108
|
else:
|
106
|
-
print(f"calling litellm with model {model}, messages: {messages}, max_retries: 0, history: {history}, base_url: {
|
107
|
-
response = litellm.completion(model=model, messages=messages, max_retries=0, base_url=
|
109
|
+
print(f"calling litellm with model {model}, messages: {messages}, max_retries: 0, history: {history}, base_url: {base_url}")
|
110
|
+
response = litellm.completion(model=model, messages=messages, max_retries=0, base_url=base_url)
|
108
111
|
print(f"Response: {response}")
|
109
112
|
tool_calls = []
|
110
113
|
if hasattr(response, 'tool_calls'):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fyodorov_llm_agents
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.132
|
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
|
@@ -0,0 +1,7 @@
|
|
1
|
+
fyodorov_llm_agents/agents/agent.py,sha256=W1VkCeKAN7PYabUFlrchmad91P4NFcuqr1rRquwH1hI,6564
|
2
|
+
fyodorov_llm_agents/agents/openai.py,sha256=FA5RS7yn3JwvFA8PXju60XSYC_2oUZFNgBUzeIYtGv0,1154
|
3
|
+
fyodorov_llm_agents/tools/tool.py,sha256=HyOk0X_3XE23sa8J-8UZx657tJ0sxwZWMbA4OPxXU6E,7940
|
4
|
+
fyodorov_llm_agents-0.2.132.dist-info/METADATA,sha256=ShFg69uX4z-A7Qv9zXYUIcXWWCknYrqQ-aTKhRdPEFw,552
|
5
|
+
fyodorov_llm_agents-0.2.132.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
+
fyodorov_llm_agents-0.2.132.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
|
7
|
+
fyodorov_llm_agents-0.2.132.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
fyodorov_llm_agents/agents/agent.py,sha256=dsWpMYNN6yo3nDbpJ622DCgv9v-nXOPy5OHveZhRDRw,6550
|
2
|
-
fyodorov_llm_agents/agents/openai.py,sha256=FA5RS7yn3JwvFA8PXju60XSYC_2oUZFNgBUzeIYtGv0,1154
|
3
|
-
fyodorov_llm_agents/tools/tool.py,sha256=HyOk0X_3XE23sa8J-8UZx657tJ0sxwZWMbA4OPxXU6E,7940
|
4
|
-
fyodorov_llm_agents-0.2.130.dist-info/METADATA,sha256=Krw50WuKYOWSefqw4N1Sv2lRtOtiTe3in_taDLcmeAw,552
|
5
|
-
fyodorov_llm_agents-0.2.130.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
6
|
-
fyodorov_llm_agents-0.2.130.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
|
7
|
-
fyodorov_llm_agents-0.2.130.dist-info/RECORD,,
|
File without changes
|
{fyodorov_llm_agents-0.2.130.dist-info → fyodorov_llm_agents-0.2.132.dist-info}/top_level.txt
RENAMED
File without changes
|