Skip to content

Commit 84669d5

Browse files
committed
AIJudge to Judge
1 parent 06acc21 commit 84669d5

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

ldai/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from ldai.chat import TrackedChat
66
from ldai.client import LDAIClient
77
# Export judge
8-
from ldai.judge import AIJudge
8+
from ldai.judge import Judge
99
# Export models for convenience
1010
from ldai.models import ( # Deprecated aliases for backward compatibility
1111
AIAgentConfig, AIAgentConfigDefault, AIAgentConfigRequest, AIAgents,
@@ -25,7 +25,7 @@
2525
'AICompletionConfigDefault',
2626
'AIJudgeConfig',
2727
'AIJudgeConfigDefault',
28-
'AIJudge',
28+
'Judge',
2929
'TrackedChat',
3030
'EvalScore',
3131
'JudgeConfiguration',

ldai/chat/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import asyncio
44
from typing import Any, Dict, List, Optional
55

6-
from ldai.judge import AIJudge
6+
from ldai.judge import Judge
77
from ldai.models import AICompletionConfig, LDMessage
88
from ldai.providers.ai_provider import AIProvider
99
from ldai.providers.types import ChatResponse, JudgeResponse
@@ -24,7 +24,7 @@ def __init__(
2424
ai_config: AICompletionConfig,
2525
tracker: LDAIConfigTracker,
2626
provider: AIProvider,
27-
judges: Optional[Dict[str, AIJudge]] = None,
27+
judges: Optional[Dict[str, Judge]] = None,
2828
logger: Optional[Any] = None,
2929
):
3030
"""
@@ -151,7 +151,7 @@ def get_provider(self) -> AIProvider:
151151
"""
152152
return self._provider
153153

154-
def get_judges(self) -> Dict[str, AIJudge]:
154+
def get_judges(self) -> Dict[str, Judge]:
155155
"""
156156
Get the judges associated with this TrackedChat.
157157

ldai/client.py

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

88
from ldai.chat import TrackedChat
9-
from ldai.judge import AIJudge
9+
from ldai.judge import Judge
1010
from ldai.models import (AIAgentConfig, AIAgentConfigDefault,
1111
AIAgentConfigRequest, AIAgents, AICompletionConfig,
1212
AICompletionConfigDefault, AIJudgeConfig,
@@ -121,7 +121,7 @@ async def create_judge(
121121
default_value: AIJudgeConfigDefault,
122122
variables: Optional[Dict[str, Any]] = None,
123123
default_ai_provider: Optional[SupportedAIProvider] = None,
124-
) -> Optional[AIJudge]:
124+
) -> Optional[Judge]:
125125
"""
126126
Creates and returns a new Judge instance for AI evaluation.
127127
@@ -182,7 +182,7 @@ async def create_judge(
182182
if not provider:
183183
return None
184184

185-
return AIJudge(judge_config, judge_config.tracker, provider, self._logger)
185+
return Judge(judge_config, judge_config.tracker, provider, self._logger)
186186
except Exception as error:
187187
# Would log error if logger available
188188
return None
@@ -193,7 +193,7 @@ async def _initialize_judges(
193193
context: Context,
194194
variables: Optional[Dict[str, Any]] = None,
195195
default_ai_provider: Optional[SupportedAIProvider] = None,
196-
) -> Dict[str, AIJudge]:
196+
) -> Dict[str, Judge]:
197197
"""
198198
Initialize judges from judge configurations.
199199
@@ -203,7 +203,7 @@ async def _initialize_judges(
203203
:param default_ai_provider: Optional default AI provider to use
204204
:return: Dictionary of judge instances keyed by their configuration keys
205205
"""
206-
judges: Dict[str, AIJudge] = {}
206+
judges: Dict[str, Judge] = {}
207207

208208
async def create_judge_for_config(judge_key: str):
209209
judge = await self.create_judge(

ldai/judge/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from ldai.tracker import LDAIConfigTracker
1414

1515

16-
class AIJudge:
16+
class Judge:
1717
"""
1818
Judge implementation that handles evaluation functionality and conversation management.
1919

0 commit comments

Comments
 (0)