Skip to content

Commit 04f3c47

Browse files
committed
feat(ns): move stuff under chat
1 parent 379b7b3 commit 04f3c47

39 files changed

+65
-103
lines changed

samples/llm_chat_agent/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,8 @@ Tools used: ['calculate']
120120
### LLM Service Initialization
121121

122122
```python
123-
from uipath._config import Config
124-
from uipath._execution_context import ExecutionContext
125-
from uipath.platform.llm_gateway._llm_gateway_service import (
123+
from uipath.platform import Config, ExecutionContext
124+
from uipath.platform.chat._llm_gateway_service import (
126125
ChatModels,
127126
UiPathLlmChatService,
128127
)
@@ -148,7 +147,7 @@ result = await llm_service.chat_completions(
148147
### Tool Definition
149148

150149
```python
151-
from uipath.platform.llm_gateway import (
150+
from uipath.platform.chat import (
152151
ToolDefinition,
153152
ToolFunctionDefinition,
154153
ToolParametersDefinition,

samples/llm_chat_agent/agent.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,18 @@
2020
import httpx
2121
from dotenv import load_dotenv
2222
from pydantic import BaseModel, Field
23-
from uipath._config import Config
24-
from uipath._execution_context import ExecutionContext
25-
from uipath.platform.llm_gateway._llm_gateway_service import (
26-
ChatModels,
27-
UiPathLlmChatService,
28-
)
29-
from uipath.platform.llm_gateway import (
23+
from uipath.platform import Config, ExecutionContext
24+
from uipath.platform.chat import (
3025
AutoToolChoice,
3126
ToolDefinition,
3227
ToolFunctionDefinition,
3328
ToolParametersDefinition,
3429
ToolPropertyDefinition,
3530
)
31+
from uipath.platform.chat._llm_gateway_service import (
32+
ChatModels,
33+
UiPathLlmChatService,
34+
)
3635
from uipath.tracing import traced
3736

3837
# Load environment variables from .env file if it exists

src/uipath/_cli/_evals/mocks/llm_mocker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def response(
9191
x.name for x in self.evaluation_item.mocking_strategy.tools_to_simulate
9292
]:
9393
from uipath.platform import UiPath
94-
from uipath.platform.llm_gateway._llm_gateway_service import _cleanup_schema
94+
from uipath.platform.chat._llm_gateway_service import _cleanup_schema
9595

9696
from .mocks import (
9797
cache_manager_context,

src/uipath/eval/evaluators/legacy_llm_as_judge_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from uipath.eval.models import NumericEvaluationResult
99

1010
from ..._utils.constants import COMMUNITY_agents_SUFFIX
11-
from ...platform.llm_gateway import UiPathLlmChatService
11+
from ...platform.chat import UiPathLlmChatService
1212
from ..models.models import AgentExecution, EvaluationResult, LLMResponse
1313
from .legacy_base_evaluator import (
1414
LegacyBaseEvaluator,

src/uipath/eval/evaluators/legacy_trajectory_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from uipath.eval.models import EvaluationResult
1010

1111
from ..._utils.constants import COMMUNITY_agents_SUFFIX
12-
from ...platform.llm_gateway import UiPathLlmChatService
12+
from ...platform.chat import UiPathLlmChatService
1313
from ..models.models import (
1414
AgentExecution,
1515
LLMResponse,

src/uipath/platform/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,6 @@
3535
"""
3636

3737
from ._uipath import UiPath
38+
from .common import Config, ExecutionContext
3839

39-
__all__ = ["UiPath"]
40+
__all__ = ["Config", "ExecutionContext", "UiPath"]

src/uipath/platform/_uipath.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33

44
from pydantic import ValidationError
55

6-
from .._config import Config
7-
from .._execution_context import ExecutionContext
86
from .._utils._auth import resolve_config
97
from .action_center import TasksService
10-
from .agenthub import McpService
118
from .autopilot import ConversationsService
12-
from .common import ApiClient
9+
from .chat import McpService, UiPathLlmChatService, UiPathOpenAIService
10+
from .common import ApiClient, Config, ExecutionContext
1311
from .connections import ConnectionsService
1412
from .context_grounding import ContextGroundingService
1513
from .documents import DocumentsService
1614
from .entities import EntitiesService
1715
from .errors import BaseUrlMissingError, SecretMissingError
1816
from .guardrails import GuardrailsService
19-
from .llm_gateway import UiPathLlmChatService, UiPathOpenAIService
2017
from .orchestrator import (
2118
AssetsService,
2219
AttachmentsService,

src/uipath/platform/action_center/_tasks_service.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
import uuid
33
from typing import Any, Dict, List, Optional, Tuple
44

5-
from ..._config import Config
6-
from ..._execution_context import ExecutionContext
7-
from ..._folder_context import FolderContext
85
from ..._utils import Endpoint, RequestSpec, resource_override
96
from ..._utils.constants import (
107
ENV_TENANT_ID,
@@ -13,6 +10,7 @@
1310
HEADER_TENANT_ID,
1411
)
1512
from ...tracing import traced
13+
from ..common import Config, ExecutionContext, FolderContext
1614
from ..common._base_service import BaseService
1715
from .task_schema import TaskSchema
1816
from .tasks import Task

src/uipath/platform/agenthub/__init__.py

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/uipath/platform/autopilot/_conversations_service.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
from uipath.core.chat import UiPathConversationMessage
22

3-
from ..._config import Config
4-
from ..._execution_context import ExecutionContext
53
from ..._utils import Endpoint, RequestSpec
64
from ...tracing import traced
7-
from ..common._base_service import BaseService
5+
from ..common import BaseService, Config, ExecutionContext
86

97

108
class ConversationsService(BaseService):

0 commit comments

Comments
 (0)