Skip to content

Commit

Permalink
chore: typo and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelrince committed Aug 5, 2024
1 parent 54e6b2b commit 0b58895
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/providers/openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Integrating EcoLogits with your applications does not alter the standard outputs

## Compatibility with Azure OpenAI

EcoLogits is compatible also compatible with [Azure OpenAI :octicons-link-external-16:](https://learn.microsoft.com/en-us/azure/ai-services/openai/).
EcoLogits is also compatible with [Azure OpenAI :octicons-link-external-16:](https://learn.microsoft.com/en-us/azure/ai-services/openai/).

```python
import os
Expand Down
21 changes: 11 additions & 10 deletions tests/test_model_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ def test_create_model_repository_from_scratch():
])
assert models.find_model(provider="provider-test", model_name="model-test")

@pytest.mark.parametrize("input_provider,input_name, expected_model_name",
[("openai", "gpt-35-turbo", "gpt-3.5-turbo"),
("openai", "gpt-3.5-turbo", "gpt-3.5-turbo"),
("openai", "gpt-4", "gpt-4"),
("openai", "gpt-4-turbo", "gpt-4-turbo"),
("mistralai", "mistral-small-2312", "mistral-small-2312"),
("mistralai", "mistral-small-notarealversion", "mistral-small"),
("google", "gemini-1.5-flash", "gemini-1.5-flash"),
])

@pytest.mark.parametrize("input_provider,input_name, expected_model_name", [
("openai", "gpt-35-turbo", "gpt-3.5-turbo"),
("openai", "gpt-3.5-turbo", "gpt-3.5-turbo"),
("openai", "gpt-4", "gpt-4"),
("openai", "gpt-4-turbo", "gpt-4-turbo"),
("mistralai", "mistral-small-2312", "mistral-small-2312"),
("mistralai", "mistral-small-notarealversion", "mistral-small"),
("google", "gemini-1.5-flash", "gemini-1.5-flash"),
])
def test_matching_cases(input_provider, input_name, expected_model_name):
models = ModelRepository.from_csv()
assert models.find_model(provider=input_provider, model_name=input_name).name ==expected_model_name
assert models.find_model(provider=input_provider, model_name=input_name).name == expected_model_name


def test_find_unknown_provider():
Expand Down

0 comments on commit 0b58895

Please sign in to comment.