codemie-sdk-python 0.1.73__tar.gz → 0.1.75__tar.gz

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 codemie-sdk-python might be problematic. Click here for more details.

Files changed (30) hide show
  1. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/PKG-INFO +20 -15
  2. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/README.md +19 -14
  3. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/pyproject.toml +1 -1
  4. codemie_sdk_python-0.1.75/src/codemie_sdk/models/__init__.py +0 -0
  5. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/assistant.py +15 -0
  6. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/assistant.py +18 -1
  7. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/__init__.py +0 -0
  8. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/auth/__init__.py +0 -0
  9. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/auth/credentials.py +0 -0
  10. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/client/__init__.py +0 -0
  11. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/client/client.py +0 -0
  12. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/exceptions.py +0 -0
  13. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/common.py +0 -0
  14. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/datasource.py +0 -0
  15. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/integration.py +0 -0
  16. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/llm.py +0 -0
  17. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/task.py +0 -0
  18. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/user.py +0 -0
  19. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/workflow.py +0 -0
  20. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/models/workflow_state.py +0 -0
  21. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/datasource.py +0 -0
  22. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/integration.py +0 -0
  23. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/llm.py +0 -0
  24. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/task.py +0 -0
  25. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/user.py +0 -0
  26. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/workflow.py +0 -0
  27. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/workflow_execution.py +0 -0
  28. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/services/workflow_execution_state.py +0 -0
  29. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/utils/__init__.py +0 -0
  30. {codemie_sdk_python-0.1.73 → codemie_sdk_python-0.1.75}/src/codemie_sdk/utils/http.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: codemie-sdk-python
3
- Version: 0.1.73
3
+ Version: 0.1.75
4
4
  Summary: CodeMie SDK for Python
5
5
  Author: Vadym Vlasenko
6
6
  Author-email: vadym_vlasenko@epam.com
@@ -746,33 +746,39 @@ For providing credentials please contact AI/Run CodeMie Team: Vadym_Vlasenko@epa
746
746
 
747
747
  ## Running tests
748
748
 
749
- For running tests on custom environment you should create .env file in the /tests directory,
750
- ask QA team: anton_yeromin@epam.com to provide all needed testing credentials
749
+ For running tests on custom environment you should create .env file in the ./tests directory,
750
+ ask QA team: anton_yeromin@epam.com to provide all needed testing credentials. Under this directory there are stubs
751
+ for .env files for running tests on local and preview environments.
752
+
753
+ Configuration example:
751
754
 
752
755
  ``` properties
753
756
 
754
757
  AUTH_SERVER_URL=https://keycloak.eks-core.aws.main.edp.projects.epam.com/auth
755
758
  AUTH_CLIENT_ID=codemie-preview
756
- AUTH_CLIENT_SECRET=<your_secret>
759
+ AUTH_CLIENT_SECRET=<auth_clienbt_secret>
757
760
  AUTH_REALM_NAME=codemie-prod
758
- CODEMIE_API_DOMAIN=https://codemie-preview.lab.epam.com/code-assistant-api
759
- NATS_URL=nats://nats-preview-codemie.epmd-edp-anthos.eu.gcp.cloudapp.epam.com:443
761
+ CODEMIE_API_DOMAIN=http://localhost:8080
760
762
  VERIFY_SSL=False
761
763
 
762
- USERNAME=<username>
763
- PASSWORD=<password>
764
+ NATS_URL=nats://localhost:4222
764
765
 
765
- TEST_USER_FULL_NAME="Test User"
766
+ ENV=local
766
767
  CLEANUP_DATA=True
767
768
 
768
- PROJECT_NAME=automation-tests-project
769
+ AUTH_USERNAME=<username>
770
+ AUTH_PASSWORD=<password>
771
+ TEST_USER_FULL_NAME=<user_full_name>
772
+
773
+ PROJECT_NAME=codemie
774
+ GIT_ENV=gitlab
769
775
 
770
776
  DEFAULT_TIMEOUT=60
771
777
 
772
778
  GITLAB_URL=https://gitbud.epam.com
773
779
  GITLAB_TOKEN=<gitlab_token>
774
780
  GITLAB_PROJECT=https://gitbud.epam.com/epm-cdme/autotests/codemie-test-project
775
- GITLAB_PROJECT_ID=<project_id>
781
+ GITLAB_PROJECT_ID=17889
776
782
 
777
783
  GITHUB_URL=https://github.com
778
784
  GITHUB_TOKEN=<github_token>
@@ -786,9 +792,8 @@ CONFLUENCE_URL=https://kb.epam.com
786
792
  CONFLUENCE_TOKEN=<confluence_token>
787
793
  CQL="space = EPMCDME and type = page and title = 'AQA Backlog Estimation'"
788
794
 
789
- AWS_ACCESS_KEY=<aws_access_key>
795
+ AWS_ACCESS_KEY=<aws_access_token>
790
796
  AWS_SECRET_KEY=<aws_secret_key>
791
- AWS_SESSION_TOKEN=<aws_session_token>
792
797
  ```
793
798
 
794
799
  Run all tests
@@ -797,10 +802,10 @@ Run all tests
797
802
  pytest -n auto --reruns 1
798
803
  ```
799
804
 
800
- Run e2e tests
805
+ Run e2e/regression tests
801
806
 
802
807
  ```shell
803
- pytest -n auto -m e2e --reruns 1
808
+ pytest -n auto -m "e2e or regression" --reruns 1
804
809
  ```
805
810
 
806
811
  Run tests for e2e tests for specific integration/tool.
@@ -733,33 +733,39 @@ For providing credentials please contact AI/Run CodeMie Team: Vadym_Vlasenko@epa
733
733
 
734
734
  ## Running tests
735
735
 
736
- For running tests on custom environment you should create .env file in the /tests directory,
737
- ask QA team: anton_yeromin@epam.com to provide all needed testing credentials
736
+ For running tests on custom environment you should create .env file in the ./tests directory,
737
+ ask QA team: anton_yeromin@epam.com to provide all needed testing credentials. Under this directory there are stubs
738
+ for .env files for running tests on local and preview environments.
739
+
740
+ Configuration example:
738
741
 
739
742
  ``` properties
740
743
 
741
744
  AUTH_SERVER_URL=https://keycloak.eks-core.aws.main.edp.projects.epam.com/auth
742
745
  AUTH_CLIENT_ID=codemie-preview
743
- AUTH_CLIENT_SECRET=<your_secret>
746
+ AUTH_CLIENT_SECRET=<auth_clienbt_secret>
744
747
  AUTH_REALM_NAME=codemie-prod
745
- CODEMIE_API_DOMAIN=https://codemie-preview.lab.epam.com/code-assistant-api
746
- NATS_URL=nats://nats-preview-codemie.epmd-edp-anthos.eu.gcp.cloudapp.epam.com:443
748
+ CODEMIE_API_DOMAIN=http://localhost:8080
747
749
  VERIFY_SSL=False
748
750
 
749
- USERNAME=<username>
750
- PASSWORD=<password>
751
+ NATS_URL=nats://localhost:4222
751
752
 
752
- TEST_USER_FULL_NAME="Test User"
753
+ ENV=local
753
754
  CLEANUP_DATA=True
754
755
 
755
- PROJECT_NAME=automation-tests-project
756
+ AUTH_USERNAME=<username>
757
+ AUTH_PASSWORD=<password>
758
+ TEST_USER_FULL_NAME=<user_full_name>
759
+
760
+ PROJECT_NAME=codemie
761
+ GIT_ENV=gitlab
756
762
 
757
763
  DEFAULT_TIMEOUT=60
758
764
 
759
765
  GITLAB_URL=https://gitbud.epam.com
760
766
  GITLAB_TOKEN=<gitlab_token>
761
767
  GITLAB_PROJECT=https://gitbud.epam.com/epm-cdme/autotests/codemie-test-project
762
- GITLAB_PROJECT_ID=<project_id>
768
+ GITLAB_PROJECT_ID=17889
763
769
 
764
770
  GITHUB_URL=https://github.com
765
771
  GITHUB_TOKEN=<github_token>
@@ -773,9 +779,8 @@ CONFLUENCE_URL=https://kb.epam.com
773
779
  CONFLUENCE_TOKEN=<confluence_token>
774
780
  CQL="space = EPMCDME and type = page and title = 'AQA Backlog Estimation'"
775
781
 
776
- AWS_ACCESS_KEY=<aws_access_key>
782
+ AWS_ACCESS_KEY=<aws_access_token>
777
783
  AWS_SECRET_KEY=<aws_secret_key>
778
- AWS_SESSION_TOKEN=<aws_session_token>
779
784
  ```
780
785
 
781
786
  Run all tests
@@ -784,10 +789,10 @@ Run all tests
784
789
  pytest -n auto --reruns 1
785
790
  ```
786
791
 
787
- Run e2e tests
792
+ Run e2e/regression tests
788
793
 
789
794
  ```shell
790
- pytest -n auto -m e2e --reruns 1
795
+ pytest -n auto -m "e2e or regression" --reruns 1
791
796
  ```
792
797
 
793
798
  Run tests for e2e tests for specific integration/tool.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "codemie-sdk-python"
3
- version = "0.1.73"
3
+ version = "0.1.75"
4
4
  description = "CodeMie SDK for Python"
5
5
  authors = [
6
6
  "Vadym Vlasenko <vadym_vlasenko@epam.com>",
@@ -263,3 +263,18 @@ class EnvVars(BaseModel):
263
263
 
264
264
  class ExportAssistantPayload(BaseModel):
265
265
  env_vars: Optional[EnvVars] = None
266
+
267
+
268
+ class AssistantEvaluationRequest(BaseModel):
269
+ """Model for assistant evaluation request."""
270
+
271
+ model_config = ConfigDict(extra="ignore")
272
+
273
+ dataset_id: str = Field(description="ID of the dataset to use for evaluation")
274
+ experiment_name: str = Field(description="Name of the evaluation experiment")
275
+ system_prompt: Optional[str] = Field(
276
+ default=None, description="System prompt to use for evaluation"
277
+ )
278
+ llm_model: Optional[str] = Field(
279
+ default=None, description="LLM model to use for evaluation"
280
+ )
@@ -16,6 +16,7 @@ from ..models.assistant import (
16
16
  AssistantBase,
17
17
  Context,
18
18
  ExportAssistantPayload,
19
+ AssistantEvaluationRequest,
19
20
  )
20
21
  from ..models.common import PaginationParams
21
22
  from ..utils import ApiRequestHandler
@@ -37,7 +38,7 @@ class AssistantService:
37
38
  def list(
38
39
  self,
39
40
  minimal_response: bool = True,
40
- scope: Literal["visible_to_user", "created_by_user"] = "visible_to_user",
41
+ scope: Literal["visible_to_user", "marketplace"] = "visible_to_user",
41
42
  page: int = 0,
42
43
  per_page: int = 12,
43
44
  filters: Optional[Dict[str, Any]] = None,
@@ -213,3 +214,19 @@ class AssistantService:
213
214
  stream=True,
214
215
  json_data=request.model_dump(exclude_none=True),
215
216
  )
217
+
218
+ def evaluate(self, assistant_id: str, request: AssistantEvaluationRequest) -> dict:
219
+ """Evaluate an assistant with a dataset.
220
+
221
+ Args:
222
+ assistant_id: ID of the assistant to evaluate
223
+ request: Evaluation request details
224
+
225
+ Returns:
226
+ Evaluation results
227
+ """
228
+ return self._api.post(
229
+ f"/v1/assistants/{assistant_id}/evaluate",
230
+ dict,
231
+ json_data=request.model_dump(exclude_none=True),
232
+ )