fyodorov-llm-agents 0.4.46__py3-none-any.whl → 0.4.48__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_service.py +9 -3
- fyodorov_llm_agents/instances/instance_service.py +1 -1
- fyodorov_llm_agents/models/llm_service.py +2 -2
- {fyodorov_llm_agents-0.4.46.dist-info → fyodorov_llm_agents-0.4.48.dist-info}/METADATA +1 -1
- {fyodorov_llm_agents-0.4.46.dist-info → fyodorov_llm_agents-0.4.48.dist-info}/RECORD +7 -7
- {fyodorov_llm_agents-0.4.46.dist-info → fyodorov_llm_agents-0.4.48.dist-info}/WHEEL +0 -0
- {fyodorov_llm_agents-0.4.46.dist-info → fyodorov_llm_agents-0.4.48.dist-info}/top_level.txt +0 -0
@@ -11,6 +11,12 @@ from fyodorov_llm_agents.providers.provider_service import Provider
|
|
11
11
|
supabase: Client = get_supabase()
|
12
12
|
|
13
13
|
class Agent(AgentModel):
|
14
|
+
|
15
|
+
def __init__(self, agent: AgentModel):
|
16
|
+
super().__init__(
|
17
|
+
**agent.to_dict()
|
18
|
+
)
|
19
|
+
|
14
20
|
@staticmethod
|
15
21
|
async def create_in_db(access_token: str, agent: AgentModel) -> str:
|
16
22
|
try:
|
@@ -66,7 +72,7 @@ class Agent(AgentModel):
|
|
66
72
|
agent_dict = result.data[0]
|
67
73
|
print(f"Fetched agent: {agent_dict}")
|
68
74
|
agent_dict["modelid"] = str(agent_dict["model_id"])
|
69
|
-
model = await LLM.get_model(
|
75
|
+
model = await LLM.get_model(id = agent_dict["modelid"])
|
70
76
|
agent_dict['model'] = model.name
|
71
77
|
agent = AgentModel(**agent_dict)
|
72
78
|
return agent
|
@@ -108,7 +114,7 @@ class Agent(AgentModel):
|
|
108
114
|
agent = AgentModel.from_dict(data)
|
109
115
|
agent_dict = agent.to_dict()
|
110
116
|
model_name = data['model']
|
111
|
-
model = await LLM.get_model(
|
117
|
+
model = await LLM.get_model(user_id, model_name)
|
112
118
|
if model:
|
113
119
|
agent_dict['model_id'] = model.id
|
114
120
|
del agent_dict['model']
|
@@ -169,7 +175,7 @@ class Agent(AgentModel):
|
|
169
175
|
model = self.model
|
170
176
|
# Set environmental variable
|
171
177
|
if self.model_id:
|
172
|
-
model_instance = await LLM.get_model(
|
178
|
+
model_instance = await LLM.get_model(user_id, id = self.model_id)
|
173
179
|
model = model_instance.base_model
|
174
180
|
provider = await Provider.get_provider_by_id(model.provider_id)
|
175
181
|
print(f"Provider fetched via Provider.get_provider_by_id in call_with_fn_calling: {provider}")
|
@@ -19,7 +19,7 @@ class Instance(InstanceModel):
|
|
19
19
|
|
20
20
|
async def chat_w_fn_calls(self, input: str = "", access_token: str = JWT, user_id: str = "") -> str:
|
21
21
|
agent: AgentModel = await Agent.get_in_db(access_token=access_token, id = self.agent_id)
|
22
|
-
model: LLMModel = await LLM.get_model(
|
22
|
+
model: LLMModel = await LLM.get_model(user_id, id = agent.model_id)
|
23
23
|
print(f"Model fetched via LLM.get_model in chat_w_fn_calls: {model}")
|
24
24
|
provider: Provider = await Provider.get_provider_by_id(access_token, id = model.provider)
|
25
25
|
agent.prompt = f"{agent.prompt}\n\n{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n"
|
@@ -54,9 +54,9 @@ class LLM(LLMModel):
|
|
54
54
|
raise e
|
55
55
|
|
56
56
|
@staticmethod
|
57
|
-
async def get_model(
|
57
|
+
async def get_model(user_id: str = None, name: str = None, id: str = None) -> LLMModel:
|
58
58
|
try:
|
59
|
-
supabase = get_supabase(
|
59
|
+
supabase = get_supabase()
|
60
60
|
if id:
|
61
61
|
print(f"Getting model with id: {id}")
|
62
62
|
result = supabase.table('models').select('*').eq('id', id).execute()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: fyodorov_llm_agents
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.48
|
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,17 +1,17 @@
|
|
1
1
|
fyodorov_llm_agents/base_model.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
fyodorov_llm_agents/agents/agent_model.py,sha256=OpsnLenPfro_nTvp_oatey8BPsb5kGX1K-ctdGkGqwU,3805
|
3
|
-
fyodorov_llm_agents/agents/agent_service.py,sha256=
|
3
|
+
fyodorov_llm_agents/agents/agent_service.py,sha256=rCoa5Bt2fiXXHhdEEyr9l2qHz0_DtQcP7P7m48UgI68,10731
|
4
4
|
fyodorov_llm_agents/agents/openai.py,sha256=FA5RS7yn3JwvFA8PXju60XSYC_2oUZFNgBUzeIYtGv0,1154
|
5
5
|
fyodorov_llm_agents/instances/instance_model.py,sha256=swRzCXeUk2FFKzGMEjeToklBJRK7GdAJl1ZIoQALuxs,1368
|
6
|
-
fyodorov_llm_agents/instances/instance_service.py,sha256=
|
6
|
+
fyodorov_llm_agents/instances/instance_service.py,sha256=vHzHX7-tivJvqy5ZU5JL51zAOAuw4YZT7TXLHvKm42A,8967
|
7
7
|
fyodorov_llm_agents/models/llm_model.py,sha256=9sAM2QbVp62yFxhETii1x4VhZCn3HNwut4wqA9RUABM,1918
|
8
|
-
fyodorov_llm_agents/models/llm_service.py,sha256=
|
8
|
+
fyodorov_llm_agents/models/llm_service.py,sha256=invzXJLv5K1LsFZ2hMD1IRWoXi26_-44vYxyTWQeuhw,4832
|
9
9
|
fyodorov_llm_agents/providers/provider_model.py,sha256=7G0WSPJYGcLIFgyQF0Y-Rv4f37-TMGg7fyeZxrC3fNE,1100
|
10
10
|
fyodorov_llm_agents/providers/provider_service.py,sha256=iYpcyBUh4MZK9cKl2O-B7GSvSKmTUMgDjkzsTOw9Qyw,6761
|
11
11
|
fyodorov_llm_agents/tools/mcp_tool_model.py,sha256=aCJGW1WZoeTX5UVD8K-ljUTf0dxPLpPZphIKZTIuipM,5278
|
12
12
|
fyodorov_llm_agents/tools/mcp_tool_service.py,sha256=ijgR74pLcH9Bk-b-yAo9I8ZcXHJcrZOrgoWYGljxGhA,7697
|
13
13
|
fyodorov_llm_agents/tools/tool.py,sha256=HyOk0X_3XE23sa8J-8UZx657tJ0sxwZWMbA4OPxXU6E,7940
|
14
|
-
fyodorov_llm_agents-0.4.
|
15
|
-
fyodorov_llm_agents-0.4.
|
16
|
-
fyodorov_llm_agents-0.4.
|
17
|
-
fyodorov_llm_agents-0.4.
|
14
|
+
fyodorov_llm_agents-0.4.48.dist-info/METADATA,sha256=hEuwfADPXssDG80tgs-V_QFBWjSuCFD2Sj07T1gnYmY,551
|
15
|
+
fyodorov_llm_agents-0.4.48.dist-info/WHEEL,sha256=7ciDxtlje1X8OhobNuGgi1t-ACdFSelPnSmDPrtlobY,91
|
16
|
+
fyodorov_llm_agents-0.4.48.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
|
17
|
+
fyodorov_llm_agents-0.4.48.dist-info/RECORD,,
|
File without changes
|
File without changes
|