Skip to content

Commit

Permalink
Add title to the base url field (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Aug 26, 2024
1 parent 24932e4 commit 2f2a85e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions fastagency/studio/models/llms/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ class Anthropic(Model):
),
]

base_url: Annotated[URL, Field(description="The base URL of the Anthropic API")] = (
URL(url="https://api.anthropic.com/v1")
)
base_url: Annotated[
URL, Field(title="Base URL", description="The base URL of the Anthropic API")
] = URL(url="https://api.anthropic.com/v1")

api_type: Annotated[
Literal["anthropic"],
Expand Down
2 changes: 1 addition & 1 deletion fastagency/studio/models/llms/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class AzureOAI(Model):
]

base_url: Annotated[
URL, Field(description="The base URL of the Azure OpenAI API")
URL, Field(title="Base URL", description="The base URL of the Azure OpenAI API")
] = UrlModel(url="https://{your-resource-name}.openai.azure.com").url

api_type: Annotated[
Expand Down
6 changes: 3 additions & 3 deletions fastagency/studio/models/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ class OpenAI(Model):
),
]

base_url: Annotated[URL, Field(description="The base URL of the OpenAI API")] = URL(
url="https://api.openai.com/v1"
)
base_url: Annotated[
URL, Field(title="Base URL", description="The base URL of the OpenAI API")
] = URL(url="https://api.openai.com/v1")

api_type: Annotated[
Literal["openai"],
Expand Down
6 changes: 3 additions & 3 deletions fastagency/studio/models/llms/together.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ class TogetherAI(Model):
Field(title="API Key", description="The API Key from Together.ai"),
]

base_url: Annotated[URL, Field(description="The base URL of the OpenAI API")] = URL(
url="https://api.together.xyz/v1"
)
base_url: Annotated[
URL, Field(title="Base URL", description="The base URL of the OpenAI API")
] = URL(url="https://api.together.xyz/v1")

api_type: Annotated[
Literal["togetherai"],
Expand Down
2 changes: 1 addition & 1 deletion tests/studio/models/llms/test_anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def test_anthropic_model_schema(self) -> None:
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"title": "Base Url",
"title": "Base URL",
"type": "string",
},
"api_type": {
Expand Down
2 changes: 1 addition & 1 deletion tests/studio/models/llms/test_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def test_azure_model_schema(self) -> None:
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"title": "Base Url",
"title": "Base URL",
"type": "string",
},
"api_type": {
Expand Down
2 changes: 1 addition & 1 deletion tests/studio/models/llms/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def test_openai_schema(self) -> None:
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"title": "Base Url",
"title": "Base URL",
"type": "string",
},
"api_type": {
Expand Down
2 changes: 1 addition & 1 deletion tests/studio/models/llms/test_together.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_togetherai_schema(self) -> None:
"format": "uri",
"maxLength": 2083,
"minLength": 1,
"title": "Base Url",
"title": "Base URL",
"type": "string",
},
"api_type": {
Expand Down

0 comments on commit 2f2a85e

Please sign in to comment.