praisonaiagents 0.0.21__py3-none-any.whl → 0.0.22__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -140,7 +140,7 @@ class Agent:
140
140
  goal: Optional[str] = None,
141
141
  backstory: Optional[str] = None,
142
142
  instructions: Optional[str] = None,
143
- llm: Optional[Union[str, Any]] = "gpt-4o",
143
+ llm: Optional[Union[str, Any]] = None,
144
144
  tools: Optional[List[Any]] = None,
145
145
  function_calling_llm: Optional[Any] = None,
146
146
  max_iter: int = 20,
@@ -189,7 +189,8 @@ class Agent:
189
189
  self.self_reflect = True if self_reflect is None else self_reflect
190
190
 
191
191
  self.instructions = instructions
192
- self.llm = llm
192
+ # Check for model name in environment variable if not provided
193
+ self.llm = llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
193
194
  self.tools = tools if tools else [] # Store original tools
194
195
  self.function_calling_llm = function_calling_llm
195
196
  self.max_iter = max_iter
@@ -214,7 +215,8 @@ class Agent:
214
215
  self.markdown = markdown
215
216
  self.max_reflect = max_reflect
216
217
  self.min_reflect = min_reflect
217
- self.reflect_llm = reflect_llm
218
+ # Use the same model selection logic for reflect_llm
219
+ self.reflect_llm = reflect_llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
218
220
  self.console = Console() # Create a single console instance for the agent
219
221
 
220
222
  # Initialize system prompt
@@ -54,9 +54,11 @@ class PraisonAIAgents:
54
54
  self.verbose = verbose
55
55
  self.max_retries = max_retries
56
56
  self.process = process
57
- if not manager_llm:
58
- logging.debug("No manager_llm provided. Using OPENAI_MODEL_NAME environment variable or defaulting to 'gpt-4o'")
59
- self.manager_llm = manager_llm if manager_llm else os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
57
+
58
+ # Check for manager_llm in environment variable if not provided
59
+ self.manager_llm = manager_llm or os.getenv('OPENAI_MODEL_NAME', 'gpt-4o')
60
+ if self.verbose:
61
+ logging.info(f"Using model {self.manager_llm} for manager")
60
62
 
61
63
  # If no tasks provided, generate them from agents
62
64
  if tasks is None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: praisonaiagents
3
- Version: 0.0.21
3
+ Version: 0.0.22
4
4
  Summary: Praison AI agents for completing complex tasks with Self Reflection Agents
5
5
  Author: Mervin Praison
6
6
  Requires-Dist: pydantic
@@ -1,9 +1,9 @@
1
1
  praisonaiagents/__init__.py,sha256=xJLN8i6V9SRmJFMxSRWDQt_hBePoupVd3WanNIgbBbc,1052
2
2
  praisonaiagents/main.py,sha256=7Phfe0gdxHzbhPb3WRzBTfq9CaLq0K31M5DM_4oCiCQ,12451
3
3
  praisonaiagents/agent/__init__.py,sha256=sKO8wGEXvtCrvV1e834r1Okv0XAqAxqZCqz6hKLiTvA,79
4
- praisonaiagents/agent/agent.py,sha256=NjoFCM1d2IWEgAGNcc_g0OGMLWUebkba_BgQtjM1tT4,32419
4
+ praisonaiagents/agent/agent.py,sha256=E4Kb-U8IDhlvn0F4-oeSEof3_vuu4FDsQmoPZSdYUaE,32635
5
5
  praisonaiagents/agents/__init__.py,sha256=7RDeQNSqZg5uBjD4M_0p_F6YgfWuDuxPFydPU50kDYc,120
6
- praisonaiagents/agents/agents.py,sha256=EnrX-nvIsRyi2Xv1fBpZZ1kCaY9CvrcNqxgL_GNqaQc,23089
6
+ praisonaiagents/agents/agents.py,sha256=Q2skltMf0xYBImpEW528_Kv2ClnLDyTy3yIzS24hGbY,23097
7
7
  praisonaiagents/build/lib/praisonaiagents/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
8
8
  praisonaiagents/build/lib/praisonaiagents/main.py,sha256=zDhN5KKtKbfruolDNxlyJkcFlkSt4KQkQTDRfQVAhxc,3960
9
9
  praisonaiagents/build/lib/praisonaiagents/agent/__init__.py,sha256=sKO8wGEXvtCrvV1e834r1Okv0XAqAxqZCqz6hKLiTvA,79
@@ -18,7 +18,7 @@ praisonaiagents/task/__init__.py,sha256=VL5hXVmyGjINb34AalxpBMl-YW9m5EDcRkMTKkSS
18
18
  praisonaiagents/task/task.py,sha256=UiiWgLDOdX_w0opP8h8-u-leVZlq1CkpGUmf7L2qyJs,3110
19
19
  praisonaiagents/tools/__init__.py,sha256=rFen7LHI55mxBVW2raQmqKnK_JFuvTVVAuUmrQpDg_c,87
20
20
  praisonaiagents/tools/tools.py,sha256=fs0fjW7Y_k9qsaR0CmlPjayiiVrDxDmgfr5SwR1Tdck,1363
21
- praisonaiagents-0.0.21.dist-info/METADATA,sha256=o5mWRqp1BpA36xWCw2V7mArC7iujMSD2z6lTWl8_9Qo,233
22
- praisonaiagents-0.0.21.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
23
- praisonaiagents-0.0.21.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
24
- praisonaiagents-0.0.21.dist-info/RECORD,,
21
+ praisonaiagents-0.0.22.dist-info/METADATA,sha256=CSsaNWWddnP3xTnXv8OTlglEHBX9S3CZeWJZEw_yTIM,233
22
+ praisonaiagents-0.0.22.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
23
+ praisonaiagents-0.0.22.dist-info/top_level.txt,sha256=_HsRddrJ23iDx5TTqVUVvXG2HeHBL5voshncAMDGjtA,16
24
+ praisonaiagents-0.0.22.dist-info/RECORD,,