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.
- praisonaiagents/agent/agent.py +5 -3
- praisonaiagents/agents/agents.py +5 -3
- {praisonaiagents-0.0.21.dist-info → praisonaiagents-0.0.22.dist-info}/METADATA +1 -1
- {praisonaiagents-0.0.21.dist-info → praisonaiagents-0.0.22.dist-info}/RECORD +6 -6
- {praisonaiagents-0.0.21.dist-info → praisonaiagents-0.0.22.dist-info}/WHEEL +0 -0
- {praisonaiagents-0.0.21.dist-info → praisonaiagents-0.0.22.dist-info}/top_level.txt +0 -0
praisonaiagents/agent/agent.py
CHANGED
@@ -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]] =
|
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
|
-
|
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
|
-
|
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
|
praisonaiagents/agents/agents.py
CHANGED
@@ -54,9 +54,11 @@ class PraisonAIAgents:
|
|
54
54
|
self.verbose = verbose
|
55
55
|
self.max_retries = max_retries
|
56
56
|
self.process = process
|
57
|
-
|
58
|
-
|
59
|
-
self.manager_llm = manager_llm
|
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,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=
|
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=
|
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.
|
22
|
-
praisonaiagents-0.0.
|
23
|
-
praisonaiagents-0.0.
|
24
|
-
praisonaiagents-0.0.
|
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,,
|
File without changes
|
File without changes
|