Python: added embeddingsclient and redid chatclient (#132)

* added embeddingsclient and redid chatclient

* added to init

* added client tests

* fixed typing

* fixed slice import

* fixed pyright
This commit is contained in:
Eduard van Valkenburg
2025-07-07 18:43:54 +02:00
committed by GitHub
Unverified
parent d6c829cddf
commit 09309c1239
7 changed files with 316 additions and 67 deletions
+5 -2
View File
@@ -1,6 +1,7 @@
# Copyright (c) Microsoft. All rights reserved.
from . import __version__ # type: ignore[attr-defined]
from ._clients import ChatClient, EmbeddingGenerator
from ._logging import get_logger
from ._tools import AITool, ai_function
from ._types import (
@@ -17,7 +18,7 @@ from ._types import (
ErrorContent,
FunctionCallContent,
FunctionResultContent,
ModelClient,
GeneratedEmbeddings,
StructuredResponse,
TextContent,
TextReasoningContent,
@@ -31,6 +32,7 @@ __all__ = [
"AIContent",
"AIContents",
"AITool",
"ChatClient",
"ChatFinishReason",
"ChatMessage",
"ChatOptions",
@@ -39,11 +41,12 @@ __all__ = [
"ChatRole",
"ChatToolMode",
"DataContent",
"EmbeddingGenerator",
"ErrorContent",
"FunctionCallContent",
"FunctionResultContent",
"GeneratedEmbeddings",
"InputGuardrail",
"ModelClient",
"OutputGuardrail",
"StructuredResponse",
"TextContent",