Skip to content

Commit

Permalink
fix azure ai inference
Browse files Browse the repository at this point in the history
  • Loading branch information
eavanvalkenburg committed Nov 6, 2024
1 parent be70118 commit ea7e8e7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion python/.pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ repos:
- id: mypy
files: ^python/semantic_kernel/
name: mypy
entry: uv run mypy -p semantic_kernel --config-file python/mypy.ini
entry: bash -c 'cd python && uv run mypy -p semantic_kernel --config-file mypy.ini'
language: system
types: [python]
pass_filenames: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@
import sys
from typing import TYPE_CHECKING, Any

from azure.ai.inference.aio import EmbeddingsClient
from azure.ai.inference.models import EmbeddingsResult
from azure.core.credentials import AzureKeyCredential
from numpy import array, ndarray
from pydantic import ValidationError

if sys.version_info >= (3, 12):
from typing import override # pragma: no cover
else:
from typing_extensions import override # pragma: no cover

from azure.ai.inference.aio import EmbeddingsClient
from azure.ai.inference.models import EmbeddingsResult
from azure.core.credentials import AzureKeyCredential
from azure.identity import DefaultAzureCredential
from numpy import array, ndarray
from pydantic import ValidationError

from semantic_kernel.connectors.ai.azure_ai_inference.azure_ai_inference_prompt_execution_settings import (
AzureAIInferenceEmbeddingPromptExecutionSettings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from azure.ai.inference.models import (
ChatChoice,
ChatCompletions,
ChatCompletionsFunctionToolCall,
ChatCompletionsToolCall,
ChatResponseMessage,
CompletionsUsage,
FunctionCall,
Expand Down Expand Up @@ -135,7 +135,7 @@ def mock_azure_ai_inference_chat_completion_response_with_tool_call(model_id) ->
message=ChatResponseMessage(
role="assistant",
tool_calls=[
ChatCompletionsFunctionToolCall(
ChatCompletionsToolCall(
id="test_id",
function=FunctionCall(
name="test_function",
Expand Down Expand Up @@ -224,7 +224,7 @@ def mock_azure_ai_inference_streaming_chat_completion_response_with_tool_call(mo
delta=ChatResponseMessage(
role="assistant",
tool_calls=[
ChatCompletionsFunctionToolCall(
ChatCompletionsToolCall(
id="test_id",
function=FunctionCall(
name="test_function",
Expand Down

0 comments on commit ea7e8e7

Please sign in to comment.