Corrected typo in get_capabilities in _model_info.py (#4002)

This commit is contained in:
Rohan Thacker 2024-10-31 02:09:45 +05:30 committed by GitHub
parent 6bea055b26
commit 3c63f6f3ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -112,7 +112,7 @@ def resolve_model(model: str) -> str:
return model return model
def get_capabilties(model: str) -> ModelCapabilities: def get_capabilities(model: str) -> ModelCapabilities:
resolved_model = resolve_model(model) resolved_model = resolve_model(model)
return _MODEL_CAPABILITIES[resolved_model] return _MODEL_CAPABILITIES[resolved_model]

View File

@ -333,7 +333,7 @@ class BaseOpenAIChatCompletionClient(ChatCompletionClient):
if model_capabilities is None and isinstance(client, AsyncAzureOpenAI): if model_capabilities is None and isinstance(client, AsyncAzureOpenAI):
raise ValueError("AzureOpenAIChatCompletionClient requires explicit model capabilities") raise ValueError("AzureOpenAIChatCompletionClient requires explicit model capabilities")
elif model_capabilities is None: elif model_capabilities is None:
self._model_capabilities = _model_info.get_capabilties(create_args["model"]) self._model_capabilities = _model_info.get_capabilities(create_args["model"])
else: else:
self._model_capabilities = model_capabilities self._model_capabilities = model_capabilities

View File

@ -112,7 +112,7 @@ def resolve_model(model: str) -> str:
return model return model
def get_capabilties(model: str) -> ModelCapabilities: def get_capabilities(model: str) -> ModelCapabilities:
resolved_model = resolve_model(model) resolved_model = resolve_model(model)
return _MODEL_CAPABILITIES[resolved_model] return _MODEL_CAPABILITIES[resolved_model]

View File

@ -334,7 +334,7 @@ class BaseOpenAIChatCompletionClient(ChatCompletionClient):
if model_capabilities is None and isinstance(client, AsyncAzureOpenAI): if model_capabilities is None and isinstance(client, AsyncAzureOpenAI):
raise ValueError("AzureOpenAIChatCompletionClient requires explicit model capabilities") raise ValueError("AzureOpenAIChatCompletionClient requires explicit model capabilities")
elif model_capabilities is None: elif model_capabilities is None:
self._model_capabilities = _model_info.get_capabilties(create_args["model"]) self._model_capabilities = _model_info.get_capabilities(create_args["model"])
else: else:
self._model_capabilities = model_capabilities self._model_capabilities = model_capabilities