-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
07aee22
commit 3e01634
Showing
6 changed files
with
23 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
# This file was auto-generated by Fern from our API Definition. | ||
|
||
import typing_extensions | ||
import enum | ||
import typing | ||
|
||
LlmProvider = typing_extensions.Literal["OPENAI"] | ||
T_Result = typing.TypeVar("T_Result") | ||
|
||
|
||
class LlmProvider(str, enum.Enum): | ||
""" | ||
An enumeration. | ||
""" | ||
|
||
OPENAI = "OPENAI" | ||
AZURE_OPENAI = "AZURE_OPENAI" | ||
|
||
def visit(self, openai: typing.Callable[[], T_Result], azure_openai: typing.Callable[[], T_Result]) -> T_Result: | ||
if self is LlmProvider.OPENAI: | ||
return openai() | ||
if self is LlmProvider.AZURE_OPENAI: | ||
return azure_openai() |
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