-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DOCS-298: Update Rev AI python sdk to support different base url (#116)
- Loading branch information
1 parent
d1ddb4a
commit b171899
Showing
16 changed files
with
128 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from enum import Enum | ||
from typing import Dict, TypedDict | ||
|
||
|
||
class RevAiApiDeployment(Enum): | ||
""" | ||
Enum representing the deployment regions for Rev AI API. | ||
Attributes: | ||
US: Represents the United States deployment. | ||
EU: Represents the European Union deployment. | ||
""" | ||
US = 'US' | ||
EU = 'EU' | ||
|
||
|
||
class RevAiApiConfig(TypedDict): | ||
""" | ||
TypedDict representing the configuration for a Rev AI API deployment. | ||
Attributes: | ||
base_url: The base URL for API requests. | ||
base_websocket_url: The base URL for WebSocket connections. | ||
""" | ||
base_url: str | ||
base_websocket_url: str | ||
|
||
|
||
# Dictionary mapping RevAiApiDeployment enum values to their respective configuration settings. | ||
RevAiApiDeploymentConfigMap: Dict[RevAiApiDeployment, RevAiApiConfig] = { | ||
RevAiApiDeployment.US: { | ||
'base_url': 'https://api.rev.ai', | ||
'base_websocket_url': 'wss://api.rev.ai' | ||
}, | ||
RevAiApiDeployment.EU: { | ||
'base_url': 'https://ec1.api.rev.ai', | ||
'base_websocket_url': 'wss://ec1.api.rev.ai' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.