feat: update LangfuseConfig host config (#5846)

This commit is contained in:
Joe 2024-07-02 13:14:07 +08:00 committed by GitHub
parent 774a17cedf
commit 598e030a7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,8 +27,8 @@ class LangfuseConfig(BaseTracingConfig):
def set_value(cls, v, info: ValidationInfo):
if v is None or v == "":
v = 'https://api.langfuse.com'
if not v.startswith('https://'):
raise ValueError('host must start with https://')
if not v.startswith('https://') or not v.startswith('http://'):
raise ValueError('host must start with https:// or http://')
return v