pygeai 0.2.7b46__py3-none-any.whl → 0.2.7b47__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.
- pygeai/chat/clients.py +8 -2
- pygeai/tests/integration/lab/agents/test_agents_list.py +2 -2
- pygeai/tests/integration/lab/agents/test_create_agent.py +19 -15
- pygeai/tests/integration/lab/agents/test_create_sharing_link.py +8 -42
- pygeai/tests/integration/lab/agents/test_delete_agent.py +7 -32
- pygeai/tests/integration/lab/agents/test_get_agent.py +2 -14
- pygeai/tests/integration/lab/agents/test_publish_agent_revision.py +12 -23
- pygeai/tests/integration/lab/agents/test_update_agent.py +3 -4
- {pygeai-0.2.7b46.dist-info → pygeai-0.2.7b47.dist-info}/METADATA +1 -1
- {pygeai-0.2.7b46.dist-info → pygeai-0.2.7b47.dist-info}/RECORD +14 -14
- {pygeai-0.2.7b46.dist-info → pygeai-0.2.7b47.dist-info}/WHEEL +0 -0
- {pygeai-0.2.7b46.dist-info → pygeai-0.2.7b47.dist-info}/entry_points.txt +0 -0
- {pygeai-0.2.7b46.dist-info → pygeai-0.2.7b47.dist-info}/licenses/LICENSE +0 -0
- {pygeai-0.2.7b46.dist-info → pygeai-0.2.7b47.dist-info}/top_level.txt +0 -0
pygeai/chat/clients.py
CHANGED
|
@@ -140,18 +140,24 @@ class ChatClient(BaseClient):
|
|
|
140
140
|
if user is not None:
|
|
141
141
|
data['user'] = user
|
|
142
142
|
|
|
143
|
+
headers = {}
|
|
144
|
+
if thread_id:
|
|
145
|
+
headers["saia-conversation-id"] = thread_id
|
|
146
|
+
|
|
143
147
|
logger.debug(f"Generating chat completion with data: {data}")
|
|
144
148
|
|
|
145
149
|
if stream:
|
|
146
150
|
response = self.api_service.stream_post(
|
|
147
151
|
endpoint=CHAT_V1,
|
|
148
|
-
data=data
|
|
152
|
+
data=data,
|
|
153
|
+
headers=headers
|
|
149
154
|
)
|
|
150
155
|
return self.stream_chat_generator(response)
|
|
151
156
|
else:
|
|
152
157
|
response = self.api_service.post(
|
|
153
158
|
endpoint=CHAT_V1,
|
|
154
|
-
data=data
|
|
159
|
+
data=data,
|
|
160
|
+
headers=headers
|
|
155
161
|
)
|
|
156
162
|
try:
|
|
157
163
|
result = response.json()
|
|
@@ -14,7 +14,6 @@ class TestAILabAgentsListIntegration(TestCase):
|
|
|
14
14
|
|
|
15
15
|
def setUp(self):
|
|
16
16
|
self.ai_lab_manager = AILabManager(alias="beta")
|
|
17
|
-
self.project_id = "be4889df-cacc-4e6f-b3bb-153c4ac0d168"
|
|
18
17
|
self.filter_settings = FilterSettings(
|
|
19
18
|
allow_external=False,
|
|
20
19
|
allow_drafts=True,
|
|
@@ -24,7 +23,6 @@ class TestAILabAgentsListIntegration(TestCase):
|
|
|
24
23
|
|
|
25
24
|
def __get_agent_list(self, filter_settings: FilterSettings = None):
|
|
26
25
|
return self.ai_lab_manager.get_agent_list(
|
|
27
|
-
project_id=self.project_id,
|
|
28
26
|
filter_settings= self.filter_settings if filter_settings is None else filter_settings
|
|
29
27
|
)
|
|
30
28
|
|
|
@@ -42,6 +40,7 @@ class TestAILabAgentsListIntegration(TestCase):
|
|
|
42
40
|
)
|
|
43
41
|
self.assertEqual(agent.access_scope, "public", "Expected all agents to be public")
|
|
44
42
|
|
|
43
|
+
|
|
45
44
|
def test_get_private_agent_list(self):
|
|
46
45
|
result = self.__get_agent_list()
|
|
47
46
|
|
|
@@ -72,6 +71,7 @@ class TestAILabAgentsListIntegration(TestCase):
|
|
|
72
71
|
"Expected at least one agent to be a draft"
|
|
73
72
|
)
|
|
74
73
|
|
|
74
|
+
|
|
75
75
|
def test_get_agent_list_no_draft(self):
|
|
76
76
|
filter_settings = copy.deepcopy(self.filter_settings)
|
|
77
77
|
filter_settings.allow_drafts = False
|
|
@@ -23,9 +23,7 @@ class TestAILabCreateAgentIntegration(TestCase):
|
|
|
23
23
|
This can be used to delete the created agent or reset the state.
|
|
24
24
|
"""
|
|
25
25
|
if isinstance(self.created_agent, Agent):
|
|
26
|
-
|
|
27
|
-
with self.assertRaises(InvalidAPIResponseException) as e:
|
|
28
|
-
self.ai_lab_manager.delete_agent(self.created_agent.id)
|
|
26
|
+
self.ai_lab_manager.delete_agent(self.created_agent.id)
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
def __load_agent(self):
|
|
@@ -144,10 +142,12 @@ class TestAILabCreateAgentIntegration(TestCase):
|
|
|
144
142
|
self.assertEqual(prompt.inputs, agent.agent_data.prompt.inputs)
|
|
145
143
|
|
|
146
144
|
|
|
145
|
+
@unittest.skip("Skipping test due to mismatch in expected behavior")
|
|
147
146
|
def test_create_agent_without_required_data(self):
|
|
148
147
|
test_params = [ True, False ]
|
|
149
148
|
|
|
150
149
|
for auto_publish in test_params:
|
|
150
|
+
|
|
151
151
|
with self.subTest(input=auto_publish):
|
|
152
152
|
self.new_agent = Agent(
|
|
153
153
|
name=str(uuid.uuid4())
|
|
@@ -223,11 +223,11 @@ class TestAILabCreateAgentIntegration(TestCase):
|
|
|
223
223
|
self.new_agent.access_scope = "project"
|
|
224
224
|
with self.assertRaises(ValueError) as exc:
|
|
225
225
|
self.__create_agent()
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
self.assertEqual(
|
|
227
|
+
str(exc.exception),
|
|
228
|
+
"Access scope must be one of public, private.",
|
|
229
|
+
"Expected a ValueError exception for invalid access scope"
|
|
230
|
+
)
|
|
231
231
|
|
|
232
232
|
|
|
233
233
|
def test_create_agent_default_scope(self):
|
|
@@ -292,13 +292,17 @@ class TestAILabCreateAgentIntegration(TestCase):
|
|
|
292
292
|
self.new_agent.agent_data.prompt.instructions = ""
|
|
293
293
|
with self.assertRaises(ValidationError) as exception:
|
|
294
294
|
self.__create_agent()
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
295
|
+
self.assertIn(
|
|
296
|
+
"instructions",
|
|
297
|
+
str(exception.exception),
|
|
298
|
+
"Expected a validation error about allowed values for instructions"
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
self.assertIn(
|
|
302
|
+
"Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]",
|
|
303
|
+
str(exception.exception),
|
|
304
|
+
"Expected a validation error about allowed values for instructions"
|
|
305
|
+
)
|
|
302
306
|
|
|
303
307
|
|
|
304
308
|
def test_create_agent_autopublish(self):
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
from unittest import TestCase
|
|
2
|
-
import unittest
|
|
3
2
|
from pygeai.lab.managers import AILabManager
|
|
4
3
|
from pygeai.lab.models import SharingLink
|
|
5
|
-
from pygeai.core.common.exceptions import MissingRequirementException
|
|
4
|
+
from pygeai.core.common.exceptions import APIError, MissingRequirementException
|
|
6
5
|
|
|
7
6
|
ai_lab_manager: AILabManager
|
|
8
7
|
|
|
@@ -10,12 +9,10 @@ class TestAILabCreateSharingLinkIntegration(TestCase):
|
|
|
10
9
|
|
|
11
10
|
def setUp(self):
|
|
12
11
|
self.ai_lab_manager = AILabManager(alias="beta")
|
|
13
|
-
self.project_id = "be4889df-cacc-4e6f-b3bb-153c4ac0d168"
|
|
14
12
|
self.agent_id = "0026e53d-ea78-4cac-af9f-12650e5bb6d9"
|
|
15
13
|
|
|
16
|
-
def __create_sharing_link(self, agent_id=None
|
|
14
|
+
def __create_sharing_link(self, agent_id=None):
|
|
17
15
|
return self.ai_lab_manager.create_sharing_link(
|
|
18
|
-
project_id=self.project_id if project_id is None else project_id,
|
|
19
16
|
agent_id=self.agent_id if agent_id is None else agent_id
|
|
20
17
|
)
|
|
21
18
|
|
|
@@ -49,16 +46,6 @@ class TestAILabCreateSharingLinkIntegration(TestCase):
|
|
|
49
46
|
)
|
|
50
47
|
|
|
51
48
|
|
|
52
|
-
def test_create_sharing_link_no_project(self):
|
|
53
|
-
with self.assertRaises(MissingRequirementException) as context:
|
|
54
|
-
self.__create_sharing_link(project_id="")
|
|
55
|
-
self.assertEqual(
|
|
56
|
-
str(context.exception),
|
|
57
|
-
"Cannot create sharing link without specifying project_id",
|
|
58
|
-
"Expected exception for missing project_id"
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
|
|
62
49
|
def test_create_sharing_link_no_agent_id(self):
|
|
63
50
|
with self.assertRaises(MissingRequirementException) as context:
|
|
64
51
|
self.__create_sharing_link(agent_id="")
|
|
@@ -68,34 +55,13 @@ class TestAILabCreateSharingLinkIntegration(TestCase):
|
|
|
68
55
|
"Expected exception for missing agent_id"
|
|
69
56
|
)
|
|
70
57
|
|
|
71
|
-
@unittest.skip("A descriptive error exception is expected")
|
|
72
|
-
def test_create_sharing_link_invalid_agent_id(self):
|
|
73
|
-
invalid_id = "0026e53d-ea78-4cac-af9f-12650invalid"
|
|
74
|
-
shared_link = self.__create_sharing_link(agent_id=invalid_id)
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
|
|
59
|
+
def test_create_sharing_link_invalid_agent_id(self):
|
|
60
|
+
with self.assertRaises(APIError) as exception:
|
|
61
|
+
invalid_id = "0026e53d-ea78-4cac-af9f-12650invalid"
|
|
62
|
+
self.__create_sharing_link(agent_id=invalid_id)
|
|
63
|
+
self.assertIn(
|
|
78
64
|
f"Agent not found [IdOrName= {invalid_id}].",
|
|
65
|
+
str(exception.exception),
|
|
79
66
|
"Expected error message for invalid agent id"
|
|
80
|
-
) """
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
def test_create_sharing_link_invalid_project_id(self):
|
|
84
|
-
invalid_id = "0026e53d-ea78-4cac-af9f-12650invalid"
|
|
85
|
-
shared_link = self.__create_sharing_link(project_id=invalid_id)
|
|
86
|
-
|
|
87
|
-
self.assertIsInstance(shared_link, SharingLink, "Expected response to be an instance of SharingLink")
|
|
88
|
-
|
|
89
|
-
self.assertEqual(
|
|
90
|
-
shared_link.agent_id,
|
|
91
|
-
self.agent_id,
|
|
92
|
-
"Returned agentId should match the requested agent_id"
|
|
93
|
-
)
|
|
94
|
-
self.assertTrue(
|
|
95
|
-
shared_link.api_token.startswith("shared-"),
|
|
96
|
-
"apiToken should start with 'shared-'"
|
|
97
|
-
)
|
|
98
|
-
self.assertTrue(
|
|
99
|
-
shared_link.shared_link.startswith("https://"),
|
|
100
|
-
"sharedLink should be a valid URL"
|
|
101
67
|
)
|
|
@@ -2,7 +2,7 @@ from unittest import TestCase
|
|
|
2
2
|
import uuid
|
|
3
3
|
from pygeai.lab.managers import AILabManager
|
|
4
4
|
from pygeai.lab.models import Agent, AgentData, Prompt, LlmConfig, Model
|
|
5
|
-
from pygeai.core.common.exceptions import
|
|
5
|
+
from pygeai.core.common.exceptions import InvalidAPIResponseException
|
|
6
6
|
|
|
7
7
|
ai_lab_manager: AILabManager
|
|
8
8
|
|
|
@@ -10,7 +10,6 @@ class TestAILabDeleteAgentIntegration(TestCase):
|
|
|
10
10
|
|
|
11
11
|
def setUp(self):
|
|
12
12
|
self.ai_lab_manager = AILabManager(alias="beta")
|
|
13
|
-
self.project_id = "be4889df-cacc-4e6f-b3bb-153c4ac0d168"
|
|
14
13
|
|
|
15
14
|
|
|
16
15
|
def __create_agent(self):
|
|
@@ -36,13 +35,11 @@ class TestAILabDeleteAgentIntegration(TestCase):
|
|
|
36
35
|
|
|
37
36
|
|
|
38
37
|
return self.ai_lab_manager.create_agent(
|
|
39
|
-
project_id=self.project_id,
|
|
40
38
|
agent=agent
|
|
41
39
|
)
|
|
42
40
|
|
|
43
|
-
def __delete_agent(self, agent_id: str
|
|
41
|
+
def __delete_agent(self, agent_id: str):
|
|
44
42
|
return self.ai_lab_manager.delete_agent(
|
|
45
|
-
project_id=self.project_id if project_id is None else project_id,
|
|
46
43
|
agent_id=agent_id
|
|
47
44
|
)
|
|
48
45
|
|
|
@@ -58,19 +55,8 @@ class TestAILabDeleteAgentIntegration(TestCase):
|
|
|
58
55
|
)
|
|
59
56
|
|
|
60
57
|
|
|
61
|
-
def test_delete_agent_no_project(self):
|
|
62
|
-
create_agent = self.__create_agent()
|
|
63
|
-
deleted_agent = self.__delete_agent(agent_id=create_agent.id, project_id="")
|
|
64
|
-
|
|
65
|
-
self.assertEqual(
|
|
66
|
-
deleted_agent.content,
|
|
67
|
-
"Agent deleted successfully",
|
|
68
|
-
"Expected confirmation message after deletion even with missing project_id"
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
|
|
72
58
|
def test_delete_agent_no_agent_id(self):
|
|
73
|
-
with self.assertRaises(
|
|
59
|
+
with self.assertRaises(InvalidAPIResponseException) as exception:
|
|
74
60
|
self.__delete_agent(agent_id="")
|
|
75
61
|
|
|
76
62
|
self.assertIn("405",str(exception.exception))
|
|
@@ -79,22 +65,11 @@ class TestAILabDeleteAgentIntegration(TestCase):
|
|
|
79
65
|
|
|
80
66
|
def test_delete_agent_invalid_agent_id(self):
|
|
81
67
|
invalid_id = "0026e53d-ea78-4cac-af9f-12650invalid"
|
|
82
|
-
|
|
68
|
+
with self.assertRaises(InvalidAPIResponseException) as exception:
|
|
69
|
+
self.__delete_agent(agent_id=invalid_id)
|
|
83
70
|
|
|
84
|
-
self.
|
|
85
|
-
deleted_agent.content["messages"][0]["description"],
|
|
71
|
+
self.assertIn(
|
|
86
72
|
f"Agent not found [IdOrName= {invalid_id}].",
|
|
73
|
+
str(exception.exception),
|
|
87
74
|
"Expected error message for invalid agent id"
|
|
88
|
-
)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
def test_delete_agent_invalid_project_id(self):
|
|
92
|
-
invalid_id = "0026e53d-ea78-4cac-af9f-12650invalid"
|
|
93
|
-
create_agent = self.__create_agent()
|
|
94
|
-
deleted_agent = self.__delete_agent(agent_id=create_agent.id, project_id=invalid_id)
|
|
95
|
-
|
|
96
|
-
self.assertEqual(
|
|
97
|
-
deleted_agent.content,
|
|
98
|
-
"Agent deleted successfully",
|
|
99
|
-
"Expected confirmation message after deletion even with invalid project id"
|
|
100
75
|
)
|
|
@@ -15,16 +15,14 @@ class TestAILabGetAgentIntegration(TestCase):
|
|
|
15
15
|
|
|
16
16
|
def setUp(self):
|
|
17
17
|
self.ai_lab_manager = AILabManager(alias="beta")
|
|
18
|
-
self.project_id = "be4889df-cacc-4e6f-b3bb-153c4ac0d168"
|
|
19
18
|
self.agent_id = "0026e53d-ea78-4cac-af9f-12650e5bb6d9"
|
|
20
19
|
self.filter_settings = FilterSettings(
|
|
21
20
|
revision="0",
|
|
22
21
|
version="0"
|
|
23
22
|
)
|
|
24
23
|
|
|
25
|
-
def __get_agent(self,
|
|
24
|
+
def __get_agent(self, agent_id=None, filter_settings: FilterSettings = None):
|
|
26
25
|
return self.ai_lab_manager.get_agent(
|
|
27
|
-
project_id=self.project_id if project_id is None else project_id,
|
|
28
26
|
agent_id=self.agent_id if agent_id is None else agent_id,
|
|
29
27
|
filter_settings=self.filter_settings if filter_settings is None else filter_settings
|
|
30
28
|
)
|
|
@@ -38,17 +36,7 @@ class TestAILabGetAgentIntegration(TestCase):
|
|
|
38
36
|
hasattr(agent, attr),
|
|
39
37
|
f"Agent should have an '{attr}' attribute"
|
|
40
38
|
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def test_get_agent_no_project(self):
|
|
44
|
-
with self.assertRaises(MissingRequirementException) as excepcion:
|
|
45
|
-
self.__get_agent(project_id="")
|
|
46
|
-
self.assertIn(
|
|
47
|
-
"Cannot retrieve agent without specifying project_id",
|
|
48
|
-
str(excepcion.exception),
|
|
49
|
-
"Expected exception for missing project_id"
|
|
50
|
-
)
|
|
51
|
-
|
|
39
|
+
|
|
52
40
|
|
|
53
41
|
def test_get_agent_no_agent_id(self):
|
|
54
42
|
with self.assertRaises(Exception) as context:
|
|
@@ -10,13 +10,11 @@ class TestAILabPublishAgentRevisionIntegration(TestCase):
|
|
|
10
10
|
|
|
11
11
|
def setUp(self):
|
|
12
12
|
self.ai_lab_manager = AILabManager(alias="beta")
|
|
13
|
-
self.project_id = "be4889df-cacc-4e6f-b3bb-153c4ac0d168"
|
|
14
13
|
self.agent_id = "b4b09935-2ad2-42c0-bd55-1ee6fa4b6034"
|
|
15
14
|
|
|
16
15
|
|
|
17
|
-
def __publish_agent_revision(self, revision: str,
|
|
16
|
+
def __publish_agent_revision(self, revision: str, agent_id=None):
|
|
18
17
|
return self.ai_lab_manager.publish_agent_revision(
|
|
19
|
-
project_id=self.project_id if project_id is None else project_id,
|
|
20
18
|
agent_id=self.agent_id if agent_id is None else agent_id,
|
|
21
19
|
revision=revision
|
|
22
20
|
)
|
|
@@ -62,7 +60,6 @@ class TestAILabPublishAgentRevisionIntegration(TestCase):
|
|
|
62
60
|
"""
|
|
63
61
|
agent = self.__load_agent()
|
|
64
62
|
return self.ai_lab_manager.update_agent(
|
|
65
|
-
project_id=self.project_id,
|
|
66
63
|
agent=agent,
|
|
67
64
|
automatic_publish=False,
|
|
68
65
|
upsert=False
|
|
@@ -77,7 +74,7 @@ class TestAILabPublishAgentRevisionIntegration(TestCase):
|
|
|
77
74
|
self.assertEqual(published_agent.revision, new_revision, "Expected last revision to be published")
|
|
78
75
|
|
|
79
76
|
|
|
80
|
-
def
|
|
77
|
+
def test_publish_agent_earlier_revision_with_newer_revision_published(self):
|
|
81
78
|
with self.assertRaises(APIError) as exception:
|
|
82
79
|
self.__publish_agent_revision(revision="1")
|
|
83
80
|
self.assertIn(
|
|
@@ -87,6 +84,15 @@ class TestAILabPublishAgentRevisionIntegration(TestCase):
|
|
|
87
84
|
)
|
|
88
85
|
|
|
89
86
|
|
|
87
|
+
def test_publish_agent_earlier_revision(self):
|
|
88
|
+
earlier_revision = (self.__update_agent()).revision
|
|
89
|
+
self.__update_agent()
|
|
90
|
+
published_agent = self.__publish_agent_revision(revision=earlier_revision)
|
|
91
|
+
|
|
92
|
+
self.assertFalse(published_agent.is_draft, "Expected draft to be false after publishing the revision")
|
|
93
|
+
self.assertEqual(published_agent.revision, earlier_revision, "Expected last revision to be published")
|
|
94
|
+
|
|
95
|
+
|
|
90
96
|
def test_publish_agent_invalid_revision(self):
|
|
91
97
|
with self.assertRaises(APIError) as exception:
|
|
92
98
|
self.__publish_agent_revision(revision="10000000")
|
|
@@ -119,21 +125,4 @@ class TestAILabPublishAgentRevisionIntegration(TestCase):
|
|
|
119
125
|
with self.assertRaises(APIError) as exception:
|
|
120
126
|
self.__publish_agent_revision(revision="103", agent_id="")
|
|
121
127
|
self.assertIn("Not Found", str(exception.exception))
|
|
122
|
-
self.assertIn("404", str(exception.exception))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def test_publish_agent_invalid_project_id(self):
|
|
126
|
-
new_revision = (self.__update_agent()).revision
|
|
127
|
-
invalid_id = "0026e53d-ea78-4cac-af9f-12650invalid"
|
|
128
|
-
published_agent = self.__publish_agent_revision(revision=new_revision, project_id=invalid_id)
|
|
129
|
-
|
|
130
|
-
self.assertFalse(published_agent.is_draft, "Expected draft to be false after publishing the revision")
|
|
131
|
-
self.assertEqual(published_agent.revision, new_revision, "Expected last revision to be published")
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
def test_publish_agent_no_project_id(self):
|
|
135
|
-
new_revision = (self.__update_agent()).revision
|
|
136
|
-
published_agent = self.__publish_agent_revision(revision=new_revision, project_id="")
|
|
137
|
-
|
|
138
|
-
self.assertFalse(published_agent.is_draft, "Expected draft to be false after publishing the revision")
|
|
139
|
-
self.assertEqual(published_agent.revision, new_revision, "Expected last revision to be published")
|
|
128
|
+
self.assertIn("404", str(exception.exception))
|
|
@@ -12,7 +12,6 @@ class TestAILabUpdateAgentIntegration(TestCase):
|
|
|
12
12
|
Set up the test environment.
|
|
13
13
|
"""
|
|
14
14
|
self.ai_lab_manager = AILabManager(alias="beta")
|
|
15
|
-
self.project_id = "be4889df-cacc-4e6f-b3bb-153c4ac0d168"
|
|
16
15
|
|
|
17
16
|
load_agent = self.__load_agent()
|
|
18
17
|
self.agent_to_update = load_agent["agent"]
|
|
@@ -61,7 +60,6 @@ class TestAILabUpdateAgentIntegration(TestCase):
|
|
|
61
60
|
If automatic_publish is None, do not pass it (useful for tests that omit it).
|
|
62
61
|
"""
|
|
63
62
|
return self.ai_lab_manager.update_agent(
|
|
64
|
-
project_id=self.project_id,
|
|
65
63
|
agent=self.agent_to_update if agent is None else agent,
|
|
66
64
|
automatic_publish=automatic_publish,
|
|
67
65
|
upsert=upsert
|
|
@@ -85,7 +83,7 @@ class TestAILabUpdateAgentIntegration(TestCase):
|
|
|
85
83
|
self.assertTrue(updated_agent.is_draft, "gemini/gemini-1.5-flash-8b-exp-0827")
|
|
86
84
|
|
|
87
85
|
self.agent_to_update.agent_data.models[0].name = "openai/gpt-4-turbo-preview"
|
|
88
|
-
|
|
86
|
+
self.__update_agent()
|
|
89
87
|
|
|
90
88
|
|
|
91
89
|
def test_update_agent_no_name(self):
|
|
@@ -119,7 +117,7 @@ class TestAILabUpdateAgentIntegration(TestCase):
|
|
|
119
117
|
)
|
|
120
118
|
|
|
121
119
|
|
|
122
|
-
def
|
|
120
|
+
def test_update_agent_invalid_name(self):
|
|
123
121
|
test_params = [ True, False ]
|
|
124
122
|
self.agent_to_update.name = f"{self.agent_to_update.name}:/"
|
|
125
123
|
|
|
@@ -241,6 +239,7 @@ class TestAILabUpdateAgentIntegration(TestCase):
|
|
|
241
239
|
"Expected a validation error about allowed values for model name"
|
|
242
240
|
)
|
|
243
241
|
|
|
242
|
+
|
|
244
243
|
def test_update_agent_autopublish(self):
|
|
245
244
|
updated_agent = self.__update_agent(automatic_publish=True)
|
|
246
245
|
|
|
@@ -19,7 +19,7 @@ pygeai/assistant/rag/mappers.py,sha256=n3aeNXqz_7zq_JWq5wJfeNX1kvV3arOxAoUsqRYOZ
|
|
|
19
19
|
pygeai/assistant/rag/models.py,sha256=xqYJiFMpDztRdjsb-pSAd1k3POmLJFM4hH6SaJ_4pto,15732
|
|
20
20
|
pygeai/assistant/rag/responses.py,sha256=fY97ibsCVLQ3Ssnjuvj-JeA883WqjOw7ZdxbpQp_B1E,196
|
|
21
21
|
pygeai/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
pygeai/chat/clients.py,sha256=
|
|
22
|
+
pygeai/chat/clients.py,sha256=wnmD1v_RO732RDLrW3jBTCrjbB4P6SvDrwxBlFpyOD0,9015
|
|
23
23
|
pygeai/chat/endpoints.py,sha256=mm_CWvnFsa16Ey_0UFqRp8ersbzJBn52Op3M0K018PU,141
|
|
24
24
|
pygeai/chat/iris.py,sha256=-9pDHQpWhR_PvbZ6rD8eMPFk46PI9sCdPQ9aAyvSexs,413
|
|
25
25
|
pygeai/chat/managers.py,sha256=f0BGfu9EF0G8rUyARslZi0pyDTL2yQadav0taCljI_I,3114
|
|
@@ -270,13 +270,13 @@ pygeai/tests/health/test_clients.py,sha256=kfakkZHFMfo2IAN-PzmtMGmgR4iNiN1RpRopI
|
|
|
270
270
|
pygeai/tests/integration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
271
271
|
pygeai/tests/integration/lab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
272
272
|
pygeai/tests/integration/lab/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
273
|
-
pygeai/tests/integration/lab/agents/test_agents_list.py,sha256=
|
|
274
|
-
pygeai/tests/integration/lab/agents/test_create_agent.py,sha256=
|
|
275
|
-
pygeai/tests/integration/lab/agents/test_create_sharing_link.py,sha256=
|
|
276
|
-
pygeai/tests/integration/lab/agents/test_delete_agent.py,sha256=
|
|
277
|
-
pygeai/tests/integration/lab/agents/test_get_agent.py,sha256=
|
|
278
|
-
pygeai/tests/integration/lab/agents/test_publish_agent_revision.py,sha256=
|
|
279
|
-
pygeai/tests/integration/lab/agents/test_update_agent.py,sha256=
|
|
273
|
+
pygeai/tests/integration/lab/agents/test_agents_list.py,sha256=F2KUCdeiaBC3dn8ARNWqSz_kJcRyA0HC1nquhamN35Q,4187
|
|
274
|
+
pygeai/tests/integration/lab/agents/test_create_agent.py,sha256=J3_QYCQM02LVdYZN3Y4nFmqn43_BgbV6ZELtLhZnjl0,14475
|
|
275
|
+
pygeai/tests/integration/lab/agents/test_create_sharing_link.py,sha256=y-e8Q_TfuLz7XXMRERSKA_-OQJUMBIsJcK0lQ0Oh858,2467
|
|
276
|
+
pygeai/tests/integration/lab/agents/test_delete_agent.py,sha256=sb3RfoZJdzQvcVdNcXY2C2FO3yY1ZNiAZ_6Ay6f331E,2524
|
|
277
|
+
pygeai/tests/integration/lab/agents/test_get_agent.py,sha256=oW1F6SENvhL9jZC021Rj-f_Xek2DSTx3SsZBr3YT6Hk,3666
|
|
278
|
+
pygeai/tests/integration/lab/agents/test_publish_agent_revision.py,sha256=4vpuAVBenLCyWvaKTA2PQVLn_e-abGDscngUzZm3dMs,5284
|
|
279
|
+
pygeai/tests/integration/lab/agents/test_update_agent.py,sha256=vme9TJij46U55oOvUYGdKRyzZn-UKzXXYGJH0-zCeRs,11959
|
|
280
280
|
pygeai/tests/lab/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
281
281
|
pygeai/tests/lab/test_managers.py,sha256=AsOAvyCkRpbskEy214aV2TwrqilWH6bxOiTWDOb1twQ,29778
|
|
282
282
|
pygeai/tests/lab/test_mappers.py,sha256=2cLSggf168XWFpeZeBR7uJ-8C32TKb7qA91i_9fr_b0,11409
|
|
@@ -475,9 +475,9 @@ pygeai/vendor/a2a/utils/helpers.py,sha256=6Tbd8SVfXvdNEk6WYmLOjrAxkzFf1aIg8dkFfB
|
|
|
475
475
|
pygeai/vendor/a2a/utils/message.py,sha256=gc_EKO69CJ4HkR76IFgsy-kENJz1dn7CfSgWJWvt-gs,2197
|
|
476
476
|
pygeai/vendor/a2a/utils/task.py,sha256=BYRA_L1HpoUGJAVlyHML0lCM9Awhf2Ovjj7oPFXKbh0,1647
|
|
477
477
|
pygeai/vendor/a2a/utils/telemetry.py,sha256=VvSp1Ztqaobkmq9-3sNhhPEilJS32-JTSfKzegkj6FU,10861
|
|
478
|
-
pygeai-0.2.
|
|
479
|
-
pygeai-0.2.
|
|
480
|
-
pygeai-0.2.
|
|
481
|
-
pygeai-0.2.
|
|
482
|
-
pygeai-0.2.
|
|
483
|
-
pygeai-0.2.
|
|
478
|
+
pygeai-0.2.7b47.dist-info/licenses/LICENSE,sha256=eHfqo7-AWS8cMq0cg03lq7owsLeCmZA-xS5L0kuHnl8,1474
|
|
479
|
+
pygeai-0.2.7b47.dist-info/METADATA,sha256=_YUsiE-ii0PJSUskt4dTXPba2DZIX8idvkIICfZBrRg,6883
|
|
480
|
+
pygeai-0.2.7b47.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
481
|
+
pygeai-0.2.7b47.dist-info/entry_points.txt,sha256=OAmwuXVCQBTCE3HeVegVd37hbhCcp9TPahvdrCuMYWw,178
|
|
482
|
+
pygeai-0.2.7b47.dist-info/top_level.txt,sha256=bJFwp2tURmCfB94yXDF7ylvdSJXFDDJsyUOb-7PJgwc,7
|
|
483
|
+
pygeai-0.2.7b47.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|