Skip to content

Commit

Permalink
Update field titles and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Aug 23, 2024
1 parent cdbed5b commit d786137
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 19 deletions.
4 changes: 2 additions & 2 deletions fastagency/studio/models/agents/web_surfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@register("secret")
class BingAPIKey(Model):
api_key: Annotated[str, Field(description="The API Key from Bing")]
api_key: Annotated[str, Field(title="API Key", description="The API Key from Bing")]

@classmethod
async def create_autogen(cls, model_id: UUID, user_id: UUID, **kwargs: Any) -> str:
Expand Down Expand Up @@ -93,7 +93,7 @@ class WebSurferAgent(AgentBaseModel):
int, Field(description="The viewport size of the browser")
] = 4096
bing_api_key: Annotated[
Optional[BingAPIKeyRef], Field(description="The Bing API key for the browser")
Optional[BingAPIKeyRef], Field(title="Bing API Key", description="The Bing API key for the browser")
] = None

@classmethod
Expand Down
12 changes: 9 additions & 3 deletions fastagency/studio/models/deployments/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ class Deployment(Model):
team: Annotated[
team_type_refs,
Field(
title="Team name",
title="Team Name",
description="The team that is used in the deployment",
),
]
gh_token: GitHubTokenRef
fly_token: FlyTokenRef
gh_token: Annotated[
GitHubTokenRef,
Field(title="GH Token", description="The GitHub token to use for creating a new repository")
]
fly_token: Annotated[
FlyTokenRef,
Field(title="Fly Token", description="The Fly.io token to use for deploying the deployment")
]

@classmethod
async def create_autogen(cls, model_id: UUID, user_id: UUID, **kwargs: Any) -> Any:
Expand Down
9 changes: 8 additions & 1 deletion fastagency/studio/models/llms/anthropic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class AnthropicAPIKey(Model):
api_key: Annotated[
str,
Field(
title="API Key",
description="The API Key from Anthropic",
),
]
Expand Down Expand Up @@ -60,7 +61,13 @@ class Anthropic(Model):
),
] = "claude-3-5-sonnet-20240620"

api_key: AnthropicAPIKeyRef
api_key: Annotated[
AnthropicAPIKeyRef,
Field(
title="API Key",
description="The API Key from Anthropic",
),
]

base_url: Annotated[URL, Field(description="The base URL of the Anthropic API")] = (
URL(url="https://api.anthropic.com/v1")
Expand Down
11 changes: 7 additions & 4 deletions fastagency/studio/models/llms/azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@register("secret")
class AzureOAIAPIKey(Model):
api_key: Annotated[str, Field(description="The API Key from Azure OpenAI")]
api_key: Annotated[str, Field(title="API Key", description="The API Key from Azure OpenAI")]

@classmethod
async def create_autogen(cls, model_id: UUID, user_id: UUID, **kwargs: Any) -> str:
Expand All @@ -51,20 +51,23 @@ class AzureOAI(Model):
),
] = "gpt-3.5-turbo"

api_key: AzureOAIAPIKeyRef
api_key: Annotated[
AzureOAIAPIKeyRef,
Field(title="API Key", description="The API Key from Azure OpenAI")
]

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

api_type: Annotated[
Literal["azure"],
Field(title="API type", description="The type of the API, must be 'azure'"),
Field(title="API Type", description="The type of the API, must be 'azure'"),
] = "azure"

api_version: Annotated[
AzureApiVersionsLiteral,
Field(description="The version of the Azure OpenAI API, e.g. '2024-02-01'"),
Field(title="API Version", description="The version of the Azure OpenAI API, e.g. '2024-02-01'"),
] = "2024-02-01"

temperature: Annotated[
Expand Down
9 changes: 8 additions & 1 deletion fastagency/studio/models/llms/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class OpenAIAPIKey(Model):
api_key: Annotated[
str,
Field(
title="API Key",
description="The API Key from OpenAI",
),
]
Expand Down Expand Up @@ -73,7 +74,13 @@ class OpenAI(Model):
Field(description="The model to use for the OpenAI API, e.g. 'gpt-3.5-turbo'"),
] = "gpt-3.5-turbo"

api_key: OpenAIAPIKeyRef
api_key: Annotated[
OpenAIAPIKeyRef,
Field(
title="API Key",
description="The API Key from OpenAI",
)
]

base_url: Annotated[URL, Field(description="The base URL of the OpenAI API")] = URL(
url="https://api.openai.com/v1"
Expand Down
6 changes: 5 additions & 1 deletion fastagency/studio/models/llms/together.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class TogetherAIAPIKey(Model):
api_key: Annotated[
str,
Field(
title="API Key",
description="The API Key from Together.ai",
min_length=64,
max_length=64,
Expand Down Expand Up @@ -144,7 +145,10 @@ class TogetherAI(Model):
Field(description="The model to use for the Together API"),
] = "Meta Llama 3 70B Reference"

api_key: TogetherAIAPIKeyRef
api_key: Annotated[
TogetherAIAPIKeyRef,
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"
Expand Down
2 changes: 1 addition & 1 deletion fastagency/studio/models/secrets/fly_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@register("secret")
class FlyToken(Model):
fly_token: Annotated[
str, Field(description="The Fly.io token to use for deploying the deployment")
str, Field(title="Fly Token", description="The Fly.io token to use for deploying the deployment")
]

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion fastagency/studio/models/secrets/github_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@register("secret")
class GitHubToken(Model):
gh_token: Annotated[
str, Field(description="The GitHub token to use for creating a new repository")
str, Field(title="GH Token", description="The GitHub token to use for creating a new repository")
]

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion fastagency/studio/models/teams/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class TeamBaseModel(Model):
human_input_mode: Annotated[
Literal["ALWAYS", "TERMINATE", "NEVER"],
Field(
title="Human input mode",
title="Human Input Mode",
description="Mode for human input",
),
] = "ALWAYS"
Expand Down
4 changes: 2 additions & 2 deletions fastagency/studio/models/teams/two_agent_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ class TwoAgentTeam(TeamBaseModel):
initial_agent: Annotated[
agent_type_refs,
Field(
title="Initial agent",
title="Initial Agent",
description="Agent that starts the conversation",
),
]
secondary_agent: Annotated[
agent_type_refs,
Field(
title="Secondary agent",
title="Secondary Agent",
description="Agent that continues the conversation",
),
]
Expand Down
4 changes: 2 additions & 2 deletions fastagency/studio/models/toolboxes/toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class OpenAPIAuth(Model):
username: Annotated[
str,
Field(
description="username for openapi routes authentication",
description="Username for OpenAPI routes authentication",
),
]
password: Annotated[
str,
Field(
description="password for openapi routes authentication",
description="Password for OpenAPI routes authentication",
),
]

Expand Down

0 comments on commit d786137

Please sign in to comment.