fyodorov-llm-agents 0.4.58__py3-none-any.whl → 0.4.60__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.
@@ -55,10 +55,10 @@ class Instance(InstanceModel):
55
55
  existing_instance[key] = value
56
56
  if needs_update:
57
57
  print('Instance already exists, will update:', existing_instance)
58
- instance_dict = await Instance.update_in_db(existing_instance["id"], existing_instance)
58
+ instance = await Instance.update_in_db(existing_instance["id"], existing_instance)
59
59
  else:
60
60
  print('Instance already exists and no update needed:', existing_instance)
61
- instance_dict = existing_instance
61
+ instance = InstanceModel(**existing_instance)
62
62
  else:
63
63
  print("Creating instance in DB:", instance.to_dict())
64
64
  result = supabase.table('instances').upsert(instance.to_dict()).execute()
@@ -68,14 +68,14 @@ class Instance(InstanceModel):
68
68
  print(f"Result of creating instance in DB: {result}")
69
69
  instance_dict = result.data[0]
70
70
  instance_dict['title'] = f"{instance_dict['title']} {instance_dict['id']}"
71
- await Instance.update_in_db(instance_dict['id'], instance_dict)
72
- return instance_dict
71
+ instance = await Instance.update_in_db(instance_dict['id'], instance_dict)
72
+ return instance
73
73
  except Exception as e:
74
74
  print(f"An error occurred while creating instance: {e}")
75
75
  if 'code' in e and e.code == '23505':
76
76
  print('Instance already exists')
77
- instance_dict = Instance.get_by_title_and_agent(instance.title, instance.agent_id)
78
- return instance_dict
77
+ instance = await Instance.get_by_title_and_agent(instance.title, instance.agent_id)
78
+ return instance
79
79
  print('Error creating instance', str(e))
80
80
  raise e
81
81
 
@@ -109,7 +109,7 @@ class Instance(InstanceModel):
109
109
  raise e
110
110
 
111
111
  @staticmethod
112
- async def get_by_title_and_agent(title: str, agent_id: str) -> dict:
112
+ async def get_by_title_and_agent(title: str, agent_id: str) -> InstanceModel:
113
113
  if not title:
114
114
  raise ValueError('Instance title is required')
115
115
  if not agent_id:
@@ -122,7 +122,7 @@ class Instance(InstanceModel):
122
122
  return None
123
123
  instance_dict = result.data[0]
124
124
  print(f"Fetched instance: {instance_dict}")
125
- return instance_dict
125
+ return InstanceModel(**instance_dict)
126
126
  except Exception as e:
127
127
  print('[Instance.get_by_title_and_agent] Error fetching instance', str(e))
128
128
  raise e
@@ -38,7 +38,7 @@ class Provider(ProviderModel):
38
38
  elif provider.name == "openrouter":
39
39
  provider.api_url = "https://openrouter.ai/api/v1"
40
40
  elif provider.name == "gemini" or provider.name == "google":
41
- provider.api_url = "https://api.gemini.com/v1"
41
+ provider.api_url = "https://generativelanguage.googleapis.com/v1beta/models/"
42
42
  else:
43
43
  raise ValueError('No URL provided when creating a provider')
44
44
  print('Setting provider api_url to', provider.api_url)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fyodorov_llm_agents
3
- Version: 0.4.58
3
+ Version: 0.4.60
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
@@ -3,15 +3,15 @@ fyodorov_llm_agents/agents/agent_model.py,sha256=JNbRBWtErHnFqlP_ONd0B8Vf3o_Ayig
3
3
  fyodorov_llm_agents/agents/agent_service.py,sha256=96H_4gqchzCeZg6szy8h3cSKrcjp8t_QNFGeU5wTGAY,10333
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=XUHznbUhSwDrxs1R9w5zKe15hzEbw2YhNvgDCSWw07M,8764
6
+ fyodorov_llm_agents/instances/instance_service.py,sha256=k5uiPB5rFyHlhDdNN8jICCIASErr5zgxnDlwXE1TLmI,8799
7
7
  fyodorov_llm_agents/models/llm_model.py,sha256=9sAM2QbVp62yFxhETii1x4VhZCn3HNwut4wqA9RUABM,1918
8
8
  fyodorov_llm_agents/models/llm_service.py,sha256=t7p8pRExJr-B8MD7KleKNe8YlHZ1geDuqYzbTFo_0MM,4837
9
9
  fyodorov_llm_agents/providers/provider_model.py,sha256=7G0WSPJYGcLIFgyQF0Y-Rv4f37-TMGg7fyeZxrC3fNE,1100
10
- fyodorov_llm_agents/providers/provider_service.py,sha256=i_xKqC-fuL33Jsdo9h0jtjHSDx330DTppELxwDNaPpE,6730
10
+ fyodorov_llm_agents/providers/provider_service.py,sha256=dbLyi4_sOfciksBgbyf_iViMud93Kzpn23D7-aYIBj8,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.58.dist-info/METADATA,sha256=zZih2X4mh3DsWp_9TOO4kao8JznuE3M3LIxYbsjLKW4,551
15
- fyodorov_llm_agents-0.4.58.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
16
- fyodorov_llm_agents-0.4.58.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
17
- fyodorov_llm_agents-0.4.58.dist-info/RECORD,,
14
+ fyodorov_llm_agents-0.4.60.dist-info/METADATA,sha256=a-l5y1SBmEji2uFPp7eUTTB0612QXw-U6e8XhjrbVqU,551
15
+ fyodorov_llm_agents-0.4.60.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
16
+ fyodorov_llm_agents-0.4.60.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
17
+ fyodorov_llm_agents-0.4.60.dist-info/RECORD,,