mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-04 10:52:17 +02:00
feat: add llm models in Dograh (#64)
This commit is contained in:
parent
d60c0206d1
commit
a7bf64a02b
4 changed files with 11 additions and 7 deletions
|
|
@ -93,8 +93,11 @@ def validate_origin(origin: str, allowed_domains: list) -> bool:
|
||||||
# Check both www and non-www versions
|
# Check both www and non-www versions
|
||||||
allowed_variants = normalize_www(allowed)
|
allowed_variants = normalize_www(allowed)
|
||||||
# If any variant of domain matches any variant of allowed, it's valid
|
# If any variant of domain matches any variant of allowed, it's valid
|
||||||
if any(dv in allowed_variants or av in domain_variants
|
if any(
|
||||||
for dv in domain_variants for av in allowed_variants):
|
dv in allowed_variants or av in domain_variants
|
||||||
|
for dv in domain_variants
|
||||||
|
for av in allowed_variants
|
||||||
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,11 @@ class AzureLLMService(BaseLLMConfiguration):
|
||||||
# Dograh LLM Service
|
# Dograh LLM Service
|
||||||
class DograhLLMModel(str, Enum):
|
class DograhLLMModel(str, Enum):
|
||||||
DEFAULT = "default"
|
DEFAULT = "default"
|
||||||
FAST = "fast"
|
|
||||||
ACCURATE = "accurate"
|
ACCURATE = "accurate"
|
||||||
|
FAST = "fast"
|
||||||
|
LITE = "lite"
|
||||||
|
ZEN = "zen"
|
||||||
|
ZEN_LITE = "zen_lite"
|
||||||
|
|
||||||
|
|
||||||
@register_llm
|
@register_llm
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,7 @@ def create_stt_service(user_config):
|
||||||
"""Create and return appropriate STT service based on user configuration"""
|
"""Create and return appropriate STT service based on user configuration"""
|
||||||
if user_config.stt.provider == ServiceProviders.DEEPGRAM.value:
|
if user_config.stt.provider == ServiceProviders.DEEPGRAM.value:
|
||||||
live_options = LiveOptions(
|
live_options = LiveOptions(
|
||||||
language="multi",
|
language="multi", profanity_filter=False, endpointing=100
|
||||||
profanity_filter=False,
|
|
||||||
endpointing=100
|
|
||||||
)
|
)
|
||||||
return DeepgramSTTService(
|
return DeepgramSTTService(
|
||||||
live_options=live_options,
|
live_options=live_options,
|
||||||
|
|
|
||||||
2
pipecat
2
pipecat
|
|
@ -1 +1 @@
|
||||||
Subproject commit 53653657d851e8052f9cc5b73b6f675a44c86fe7
|
Subproject commit 34a4e018214ca4df46be7fda90872333f6e074e9
|
||||||
Loading…
Add table
Add a link
Reference in a new issue