pygeai 0.4.0b10__py3-none-any.whl → 0.4.0b11__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.
Potentially problematic release.
This version of pygeai might be problematic. Click here for more details.
- pygeai/chat/ui.py +0 -1
- pygeai/cli/commands/chat.py +47 -55
- pygeai/cli/commands/lab/ai_lab.py +0 -1
- {pygeai-0.4.0b10.dist-info → pygeai-0.4.0b11.dist-info}/METADATA +1 -1
- {pygeai-0.4.0b10.dist-info → pygeai-0.4.0b11.dist-info}/RECORD +9 -9
- {pygeai-0.4.0b10.dist-info → pygeai-0.4.0b11.dist-info}/WHEEL +0 -0
- {pygeai-0.4.0b10.dist-info → pygeai-0.4.0b11.dist-info}/entry_points.txt +0 -0
- {pygeai-0.4.0b10.dist-info → pygeai-0.4.0b11.dist-info}/licenses/LICENSE +0 -0
- {pygeai-0.4.0b10.dist-info → pygeai-0.4.0b11.dist-info}/top_level.txt +0 -0
pygeai/chat/ui.py
CHANGED
pygeai/cli/commands/chat.py
CHANGED
|
@@ -362,7 +362,7 @@ def chat_with_agent(option_list: list):
|
|
|
362
362
|
raise MissingRequirementException(f"Agent name must be specified.")
|
|
363
363
|
|
|
364
364
|
project_id = get_project_id()
|
|
365
|
-
agent_data = AgentClient().get_agent(
|
|
365
|
+
agent_data = AgentClient(project_id=project_id).get_agent(agent_id=agent_name)
|
|
366
366
|
if 'errors' in agent_data:
|
|
367
367
|
raise InvalidAgentException(f"There is no agent with that name: {agent_data.get('errors')}")
|
|
368
368
|
|
|
@@ -374,62 +374,54 @@ def chat_with_agent(option_list: list):
|
|
|
374
374
|
Console.write_stderr("Streamlit is required for GUI mode. Install it with 'pip install streamlit'.")
|
|
375
375
|
sys.exit(1)
|
|
376
376
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
377
|
+
try:
|
|
378
|
+
ui_path = resources.files("pygeai.chat").joinpath("ui.py")
|
|
379
|
+
ui_file_path = str(ui_path)
|
|
380
|
+
|
|
381
|
+
# Add the top-level project root to PYTHONPATH
|
|
382
|
+
package_root = str(Path(ui_file_path).resolve().parents[2])
|
|
383
|
+
env = os.environ.copy()
|
|
384
|
+
env["PYTHONPATH"] = package_root + os.pathsep + env.get("PYTHONPATH", "")
|
|
385
|
+
|
|
386
|
+
streamlit_cmd = [
|
|
387
|
+
sys.executable, "-m", "streamlit", "run", ui_file_path,
|
|
388
|
+
"--server.address", "127.0.0.1",
|
|
389
|
+
"--", "--agent-name", agent_name
|
|
390
|
+
]
|
|
391
|
+
|
|
392
|
+
if platform.system() == "Linux":
|
|
393
|
+
streamlit_cmd.insert(5, "--server.headless=true")
|
|
394
|
+
|
|
395
|
+
process = subprocess.Popen(
|
|
396
|
+
streamlit_cmd,
|
|
397
|
+
stdout=subprocess.PIPE,
|
|
398
|
+
stderr=subprocess.PIPE,
|
|
399
|
+
text=True
|
|
400
|
+
)
|
|
384
401
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
# Add the top-level project root to PYTHONPATH
|
|
390
|
-
package_root = str(Path(ui_file_path).resolve().parents[2])
|
|
391
|
-
env = os.environ.copy()
|
|
392
|
-
env["PYTHONPATH"] = package_root + os.pathsep + env.get("PYTHONPATH", "")
|
|
393
|
-
|
|
394
|
-
streamlit_cmd = [
|
|
395
|
-
sys.executable, "-m", "streamlit", "run", ui_file_path,
|
|
396
|
-
"--server.address", "127.0.0.1",
|
|
397
|
-
"--", "--agent-name", agent_name
|
|
398
|
-
]
|
|
399
|
-
|
|
400
|
-
if platform.system() == "Linux":
|
|
401
|
-
streamlit_cmd.insert(5, "--server.headless=true")
|
|
402
|
-
|
|
403
|
-
process = subprocess.Popen(
|
|
404
|
-
streamlit_cmd,
|
|
405
|
-
stdout=subprocess.PIPE,
|
|
406
|
-
stderr=subprocess.PIPE,
|
|
407
|
-
text=True
|
|
408
|
-
)
|
|
409
|
-
|
|
410
|
-
url = "http://localhost:8501"
|
|
411
|
-
if platform.system() == "Linux":
|
|
412
|
-
Console.write_stdout(f"Open Streamlit app at {url} (or next port like 8502 if 8501 is taken)")
|
|
413
|
-
|
|
414
|
-
try:
|
|
415
|
-
stdout, stderr = process.communicate()
|
|
416
|
-
if stderr:
|
|
417
|
-
logger.error(f"Streamlit stderr:\n{stderr}")
|
|
418
|
-
Console.write_stderr(f"Streamlit error:\n{stderr}")
|
|
419
|
-
except KeyboardInterrupt:
|
|
420
|
-
process.terminate()
|
|
421
|
-
Console.write_stdout("Streamlit stopped.")
|
|
422
|
-
sys.exit(0)
|
|
402
|
+
url = "http://localhost:8501"
|
|
403
|
+
if platform.system() == "Linux":
|
|
404
|
+
Console.write_stdout(f"Open Streamlit app at {url} (or next port like 8502 if 8501 is taken)")
|
|
423
405
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
sys.exit(
|
|
406
|
+
try:
|
|
407
|
+
stdout, stderr = process.communicate()
|
|
408
|
+
if stderr:
|
|
409
|
+
logger.error(f"Streamlit stderr:\n{stderr}")
|
|
410
|
+
Console.write_stderr(f"Streamlit error:\n{stderr}")
|
|
411
|
+
except KeyboardInterrupt:
|
|
412
|
+
process.terminate()
|
|
413
|
+
Console.write_stdout("Streamlit stopped.")
|
|
414
|
+
sys.exit(0)
|
|
415
|
+
|
|
416
|
+
except FileNotFoundError:
|
|
417
|
+
logger.error("Could not locate pygeai/chat/ui.py")
|
|
418
|
+
Console.write_stderr("Streamlit UI file not found. Ensure pygeai is installed correctly.")
|
|
419
|
+
sys.exit(1)
|
|
420
|
+
except Exception as e:
|
|
421
|
+
logger.error(f"Streamlit error: {e}")
|
|
422
|
+
Console.write_stderr(
|
|
423
|
+
f"Failed to launch Streamlit. Check port with 'lsof -i :8501' and kill any process, or try {url}.")
|
|
424
|
+
sys.exit(1)
|
|
433
425
|
else:
|
|
434
426
|
chat_session = AgentChatSession(agent_name)
|
|
435
427
|
messages = list()
|
|
@@ -15,7 +15,6 @@ from pygeai.lab.processes.clients import AgenticProcessClient
|
|
|
15
15
|
from pygeai.lab.strategies.clients import ReasoningStrategyClient
|
|
16
16
|
from pygeai.lab.tools.clients import ToolClient
|
|
17
17
|
from pygeai.lab.constants import VALID_SCOPES
|
|
18
|
-
from pygeai.tests.snippets.lab.crud_ui import project_id
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
def show_help():
|
|
@@ -25,7 +25,7 @@ pygeai/chat/iris.py,sha256=-9pDHQpWhR_PvbZ6rD8eMPFk46PI9sCdPQ9aAyvSexs,413
|
|
|
25
25
|
pygeai/chat/managers.py,sha256=f0BGfu9EF0G8rUyARslZi0pyDTL2yQadav0taCljI_I,3114
|
|
26
26
|
pygeai/chat/session.py,sha256=k7Y6rr9x7CfAGDI-Vt3c6eGLQX57YZ74lEVJGzwwdzw,1193
|
|
27
27
|
pygeai/chat/settings.py,sha256=-B2fEemZLifdsf7_7xNmWuFZYzL-yRqefivBmv3w8j8,124
|
|
28
|
-
pygeai/chat/ui.py,sha256
|
|
28
|
+
pygeai/chat/ui.py,sha256=-xvjCzBwWlvyq-C0kN2YPczl4Q0alyJamXULOlGjKRA,34595
|
|
29
29
|
pygeai/cli/__init__.py,sha256=9fVRZ6_hmlv9adqGukFuS_s5Yb3jSyF8vv50-d4mbQo,117
|
|
30
30
|
pygeai/cli/__main__.py,sha256=2RkQaX48mS2keTpv3-9rxk5dw35PL_deqxcKUUNhp6E,154
|
|
31
31
|
pygeai/cli/geai.py,sha256=Smqxqc3XIy8RMuFVIsS9qNuYtqkNWba_CJJrhe7kW0E,4451
|
|
@@ -37,7 +37,7 @@ pygeai/cli/commands/admin.py,sha256=LDxUrq9qGAswT4HbaN_c_ovVKbgGct7ffjXA8zVYjWY,
|
|
|
37
37
|
pygeai/cli/commands/assistant.py,sha256=fQ_El6_BmFDpFjm_gPxzWk7bOzhimhiTwG8K0UpcxDo,18711
|
|
38
38
|
pygeai/cli/commands/base.py,sha256=kkJEObpT2xSiObWAliJfGV73JS3LjLTMq7FEd4SpxkE,6930
|
|
39
39
|
pygeai/cli/commands/builders.py,sha256=xXk1F4phSQxHN3NiQltl_KEZdCwwJiKLmVqQsft2OC4,1130
|
|
40
|
-
pygeai/cli/commands/chat.py,sha256=
|
|
40
|
+
pygeai/cli/commands/chat.py,sha256=Y2e3NjDXYjutdxbpGUDmewZfKnR_QHb69Jz4L-2GHY4,25170
|
|
41
41
|
pygeai/cli/commands/common.py,sha256=zL1cWKMTqzqMsHBDFfVzbZe0i2l0hgJNpzjSRgvloY8,16568
|
|
42
42
|
pygeai/cli/commands/configuration.py,sha256=J1Y8AH1xYWvcY4bzqKvF-_ggEDJ22Dv4iEcCBi2pq_8,4140
|
|
43
43
|
pygeai/cli/commands/embeddings.py,sha256=om_RR3CHgfmHcTN43F6TzP71n-BS8Lf589wyBMVZJ3g,4220
|
|
@@ -57,7 +57,7 @@ pygeai/cli/commands/validators.py,sha256=lNtYSJvKFrEeg_h0oYURMuoQbNG5r6QdjzDL-aT
|
|
|
57
57
|
pygeai/cli/commands/version.py,sha256=vyJcnxwL_TfpOQI0yE2a1ZyA3VRAE7ssh9APNBXpmqk,1701
|
|
58
58
|
pygeai/cli/commands/flows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
59
59
|
pygeai/cli/commands/lab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
|
-
pygeai/cli/commands/lab/ai_lab.py,sha256=
|
|
60
|
+
pygeai/cli/commands/lab/ai_lab.py,sha256=KJMRY_xA-B_XBM2VjgniYt5UeAbcvUCZhzb1jXUUni8,129235
|
|
61
61
|
pygeai/cli/commands/lab/common.py,sha256=YBenPCVgK01Xaxgj1429bp_Ri1SN4beBxZk3dCLp7X0,6590
|
|
62
62
|
pygeai/cli/commands/lab/options.py,sha256=T13Vi97zochr0cU4yjyvvwWRPENILFDYpvqpU4uEBis,165
|
|
63
63
|
pygeai/cli/commands/lab/spec.py,sha256=EjNdEnljKpYPQyT4d4ViAPrM1g7oIitv6ddnWVkWXPk,8301
|
|
@@ -496,9 +496,9 @@ pygeai/vendor/a2a/utils/helpers.py,sha256=6Tbd8SVfXvdNEk6WYmLOjrAxkzFf1aIg8dkFfB
|
|
|
496
496
|
pygeai/vendor/a2a/utils/message.py,sha256=gc_EKO69CJ4HkR76IFgsy-kENJz1dn7CfSgWJWvt-gs,2197
|
|
497
497
|
pygeai/vendor/a2a/utils/task.py,sha256=BYRA_L1HpoUGJAVlyHML0lCM9Awhf2Ovjj7oPFXKbh0,1647
|
|
498
498
|
pygeai/vendor/a2a/utils/telemetry.py,sha256=VvSp1Ztqaobkmq9-3sNhhPEilJS32-JTSfKzegkj6FU,10861
|
|
499
|
-
pygeai-0.4.
|
|
500
|
-
pygeai-0.4.
|
|
501
|
-
pygeai-0.4.
|
|
502
|
-
pygeai-0.4.
|
|
503
|
-
pygeai-0.4.
|
|
504
|
-
pygeai-0.4.
|
|
499
|
+
pygeai-0.4.0b11.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
|
|
500
|
+
pygeai-0.4.0b11.dist-info/METADATA,sha256=06VH-s0U_TeTVjx2z9I0BYNxHv3cJoxnTj0vg4ePbl0,6941
|
|
501
|
+
pygeai-0.4.0b11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
502
|
+
pygeai-0.4.0b11.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
|
|
503
|
+
pygeai-0.4.0b11.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
|
|
504
|
+
pygeai-0.4.0b11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|