forked from AI_team/Philosophy-RAG-demo
Makes backend enum pretty printable
This commit is contained in:
parent
562c9a2ae7
commit
32c8774a0a
@ -19,6 +19,10 @@ class BackendType(Enum):
|
|||||||
aws = "aws"
|
aws = "aws"
|
||||||
local = "local"
|
local = "local"
|
||||||
|
|
||||||
|
# make the enum pretty printable for argparse
|
||||||
|
def __str__(self):
|
||||||
|
return self.value
|
||||||
|
|
||||||
|
|
||||||
def get_chat_model(backend_type: BackendType) -> BaseChatModel:
|
def get_chat_model(backend_type: BackendType) -> BaseChatModel:
|
||||||
if backend_type == BackendType.azure:
|
if backend_type == BackendType.azure:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user