pygeai 0.4.0b4__py3-none-any.whl → 0.4.0b5__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/cli/commands/chat.py +8 -2
- pygeai/cli/commands/lab/ai_lab.py +44 -550
- pygeai/cli/commands/lab/utils.py +13 -0
- pygeai/cli/geai.py +5 -2
- pygeai/cli/texts/help.py +12 -0
- pygeai/core/common/exceptions.py +5 -0
- pygeai/lab/agents/clients.py +30 -61
- pygeai/lab/clients.py +17 -0
- pygeai/lab/managers.py +1 -53
- pygeai/lab/processes/clients.py +81 -129
- pygeai/lab/strategies/clients.py +11 -17
- pygeai/lab/tools/clients.py +30 -50
- pygeai/tests/integration/lab/tools/test_create_tool.py +3 -4
- pygeai/tests/integration/lab/tools/test_list_tools.py +77 -9
- pygeai/tests/integration/lab/tools/test_update_tool.py +268 -0
- {pygeai-0.4.0b4.dist-info → pygeai-0.4.0b5.dist-info}/METADATA +1 -1
- {pygeai-0.4.0b4.dist-info → pygeai-0.4.0b5.dist-info}/RECORD +21 -18
- {pygeai-0.4.0b4.dist-info → pygeai-0.4.0b5.dist-info}/WHEEL +0 -0
- {pygeai-0.4.0b4.dist-info → pygeai-0.4.0b5.dist-info}/entry_points.txt +0 -0
- {pygeai-0.4.0b4.dist-info → pygeai-0.4.0b5.dist-info}/licenses/LICENSE +0 -0
- {pygeai-0.4.0b4.dist-info → pygeai-0.4.0b5.dist-info}/top_level.txt +0 -0
pygeai/cli/commands/chat.py
CHANGED
|
@@ -13,12 +13,14 @@ from pygeai.chat.session import AgentChatSession
|
|
|
13
13
|
from pygeai.cli.commands import Command, Option, ArgumentsEnum
|
|
14
14
|
from pygeai.cli.commands.builders import build_help_text
|
|
15
15
|
from pygeai.cli.commands.common import get_messages, get_boolean_value, get_penalty_float_value
|
|
16
|
+
from pygeai.cli.commands.lab.utils import get_project_id
|
|
16
17
|
from pygeai.cli.texts.help import CHAT_HELP_TEXT
|
|
17
|
-
from pygeai.core.common.exceptions import MissingRequirementException, WrongArgumentError
|
|
18
|
+
from pygeai.core.common.exceptions import MissingRequirementException, WrongArgumentError, InvalidAgentException
|
|
18
19
|
from prompt_toolkit import PromptSession
|
|
19
20
|
from prompt_toolkit.history import InMemoryHistory
|
|
20
21
|
|
|
21
22
|
from pygeai.core.utils.console import Console
|
|
23
|
+
from pygeai.lab.agents.clients import AgentClient
|
|
22
24
|
|
|
23
25
|
|
|
24
26
|
def show_help():
|
|
@@ -359,9 +361,13 @@ def chat_with_agent(option_list: list):
|
|
|
359
361
|
if not agent_name:
|
|
360
362
|
raise MissingRequirementException(f"Agent name must be specified.")
|
|
361
363
|
|
|
364
|
+
project_id = get_project_id()
|
|
365
|
+
agent_data = AgentClient().get_agent(project_id=project_id, agent_id=agent_name)
|
|
366
|
+
if 'errors' in agent_data:
|
|
367
|
+
raise InvalidAgentException(f"There is no agent with that name: {agent_data.get('errors')}")
|
|
368
|
+
|
|
362
369
|
if use_gui:
|
|
363
370
|
try:
|
|
364
|
-
# Check if Streamlit is installed
|
|
365
371
|
import streamlit
|
|
366
372
|
except ImportError:
|
|
367
373
|
logger.error("Streamlit not installed")
|