Replies: 1 comment
-
@IveTian 你好! 我是Dosu,一个可以帮助解决错误、回答问题并成为贡献者的机器人。在等待人类维护者时,我可以帮助你。 To resolve the validation error "1 validation error for LangfuseConfig host Value error, host must start with https:// or http://", ensure that the In your case, the Here is the relevant part of the code for reference: class LangfuseConfig(BaseTracingConfig):
public_key: str
secret_key: str
host: str = 'https://api.langfuse.com'
@field_validator("host")
def set_value(cls, v, info: ValidationInfo):
if v is None or v == "":
v = 'https://api.langfuse.com'
if not v.startswith('https://') and not v.startswith('http://'):
raise ValueError('host must start with https:// or http://')
return v Ensure that the config = LangfuseConfig(
public_key="your_public_key",
secret_key="your_secret_key",
host="https://us.cloud.langfuse.com"
) If the issue persists, review the configuration modal in the Dify platform to ensure the <Field
label='Host'
labelClassName='!text-sm'
isRequired
value={(config as LangFuseConfig).host}
onChange={handleConfigChange('host')}
placeholder='https://cloud.langfuse.com'
/> Make sure there are no hidden characters or formatting issues in the |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
All reactions