Skip to content

Commit 07c5454

Browse files
committed
use simplified Chat name
1 parent 5de380b commit 07c5454

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

ldai/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Export main client
44
# Export chat
5-
from ldai.chat import TrackedChat
5+
from ldai.chat import Chat
66
from ldai.client import LDAIClient
77
# Export judge
88
from ldai.judge import Judge
@@ -26,7 +26,7 @@
2626
'AIJudgeConfig',
2727
'AIJudgeConfigDefault',
2828
'Judge',
29-
'TrackedChat',
29+
'Chat',
3030
'EvalScore',
3131
'JudgeConfiguration',
3232
'JudgeResponse',

ldai/chat/__init__.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""TrackedChat implementation for managing AI chat conversations."""
1+
"""Chat implementation for managing AI chat conversations."""
22

33
import asyncio
44
from typing import Any, Dict, List, Optional
@@ -10,9 +10,9 @@
1010
from ldai.tracker import LDAIConfigTracker
1111

1212

13-
class TrackedChat:
13+
class Chat:
1414
"""
15-
Concrete implementation of TrackedChat that provides chat functionality
15+
Concrete implementation of Chat that provides chat functionality
1616
by delegating to an AIProvider implementation.
1717
1818
This class handles conversation management and tracking, while delegating
@@ -28,7 +28,7 @@ def __init__(
2828
logger: Optional[Any] = None,
2929
):
3030
"""
31-
Initialize the TrackedChat.
31+
Initialize the Chat.
3232
3333
:param ai_config: The completion AI configuration
3434
:param tracker: The tracker for the completion configuration
@@ -126,15 +126,15 @@ async def evaluate_judge(judge_config):
126126

127127
def get_config(self) -> AICompletionConfig:
128128
"""
129-
Get the underlying AI configuration used to initialize this TrackedChat.
129+
Get the underlying AI configuration used to initialize this Chat.
130130
131131
:return: The AI completion configuration
132132
"""
133133
return self._ai_config
134134

135135
def get_tracker(self) -> LDAIConfigTracker:
136136
"""
137-
Get the underlying AI configuration tracker used to initialize this TrackedChat.
137+
Get the underlying AI configuration tracker used to initialize this Chat.
138138
139139
:return: The tracker instance
140140
"""
@@ -152,7 +152,7 @@ def get_provider(self) -> AIProvider:
152152

153153
def get_judges(self) -> Dict[str, Judge]:
154154
"""
155-
Get the judges associated with this TrackedChat.
155+
Get the judges associated with this Chat.
156156
157157
Returns a dictionary of judge instances keyed by their configuration keys.
158158

ldai/client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ldclient import Context
66
from ldclient.client import LDClient
77

8-
from ldai.chat import TrackedChat
8+
from ldai.chat import Chat
99
from ldai.judge import Judge
1010
from ldai.models import (AIAgentConfig, AIAgentConfigDefault,
1111
AIAgentConfigRequest, AIAgents, AICompletionConfig,
@@ -241,16 +241,16 @@ async def create_chat(
241241
default_value: AICompletionConfigDefault,
242242
variables: Optional[Dict[str, Any]] = None,
243243
default_ai_provider: Optional[SupportedAIProvider] = None,
244-
) -> Optional[TrackedChat]:
244+
) -> Optional[Chat]:
245245
"""
246-
Creates and returns a new TrackedChat instance for AI chat conversations.
246+
Creates and returns a new Chat instance for AI conversations.
247247
248248
:param key: The key identifying the AI completion configuration to use
249249
:param context: Standard Context used when evaluating flags
250250
:param default_value: A default value representing a standard AI config result
251251
:param variables: Dictionary of values for instruction interpolation
252252
:param default_ai_provider: Optional default AI provider to use
253-
:return: TrackedChat instance or None if disabled/unsupported
253+
:return: Chat instance or None if disabled/unsupported
254254
255255
Example::
256256
@@ -296,7 +296,7 @@ async def create_chat(
296296
default_ai_provider,
297297
)
298298

299-
return TrackedChat(config, config.tracker, provider, judges, self._logger)
299+
return Chat(config, config.tracker, provider, judges, self._logger)
300300

301301
def agent_config(
302302
self,

0 commit comments

Comments
 (0)