fyodorov-llm-agents 0.2.99__py3-none-any.whl → 0.2.100__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,12 +72,16 @@ class Agent(BaseModel):
72
72
  'rag': self.rag,
73
73
  }
74
74
 
75
- def call_with_fn_calling(self, prompt: str = "", input: str = ""):
75
+ def call_with_fn_calling(self, prompt: str = "", input: str = "", history = []) -> dict:
76
76
  # Set environmental variable
77
- os.environ["OPENAI_API_KEY"] = self.api_key
78
- print(f"Setting OPENAI_API_KEY: {self.api_key}")
77
+ if self.api_key.startswith('sk-'):
78
+ os.environ["OPENAI_API_KEY"] = self.api_key
79
+ else:
80
+ os.environ["MISTRAL_API_KEY"] = self.api_key
81
+
79
82
  messages: [] = [
80
83
  {"content": prompt, "role": "system"},
84
+ *history,
81
85
  { "content": input, "role": "user"},
82
86
  ]
83
87
  tools = [tool.get_function() for tool in self.tools]
@@ -91,7 +95,8 @@ class Agent(BaseModel):
91
95
  answer = response.choices[0].message.content
92
96
  print(f"Answer: {answer}")
93
97
  return {
94
- "answer": answer
98
+ "answer": answer,
99
+
95
100
  }
96
101
 
97
102
  @staticmethod
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fyodorov_llm_agents
3
- Version: 0.2.99
3
+ Version: 0.2.100
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=lpD-qR-HOFquyRVPOT1cEzbDROGKBddaM74DJNdTFcU,3980
2
+ fyodorov_llm_agents/agents/openai.py,sha256=FA5RS7yn3JwvFA8PXju60XSYC_2oUZFNgBUzeIYtGv0,1154
3
+ fyodorov_llm_agents/tools/tool.py,sha256=ytc06THGiIt01KVPu10ywyWp4kCaDmwngRBfIERBpO4,7163
4
+ fyodorov_llm_agents-0.2.100.dist-info/METADATA,sha256=uRvYCBSZJgzwvyrpIxG-qeIWjApUSBIWFYl_qNbzlfQ,552
5
+ fyodorov_llm_agents-0.2.100.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
+ fyodorov_llm_agents-0.2.100.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
7
+ fyodorov_llm_agents-0.2.100.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- fyodorov_llm_agents/agents/agent.py,sha256=k3By83wtk0rJvmiYdQYtANGvUQSH28fQNXJY_fNIEaI,3872
2
- fyodorov_llm_agents/agents/openai.py,sha256=FA5RS7yn3JwvFA8PXju60XSYC_2oUZFNgBUzeIYtGv0,1154
3
- fyodorov_llm_agents/tools/tool.py,sha256=ytc06THGiIt01KVPu10ywyWp4kCaDmwngRBfIERBpO4,7163
4
- fyodorov_llm_agents-0.2.99.dist-info/METADATA,sha256=EQGxHE8phy9dUJfSEWW0jysfA3d5JQQD5c3MHM3HT78,551
5
- fyodorov_llm_agents-0.2.99.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
6
- fyodorov_llm_agents-0.2.99.dist-info/top_level.txt,sha256=4QOslsBp8Gh7ng25DceA7fHp4KguTIdAxwURz97gH-g,20
7
- fyodorov_llm_agents-0.2.99.dist-info/RECORD,,