-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add dify retriever #79
base: main
Are you sure you want to change the base?
Conversation
408077d
to
a4ac6e3
Compare
可以仿照 components/model/openai 提供对应的 examples,方便用户使用 |
dee087c
to
a5d70da
Compare
d177c60
to
4053c3b
Compare
7aec543
to
780bf73
Compare
} | ||
|
||
type Segment struct { | ||
Id string `json:"id"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面的几个 缩写站在 Golang 的习惯上,是不是应该全大写
ID、DocumentID、getURL()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其他的我这边没问题了
|
||
var ( | ||
Endpoint = "https://api.dify.ai/v1" | ||
APIKey = "dataset-api-key" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APIKey、DatasetID 可以考虑从环境变量读取,像其他组件的示例一样, 这样用户跑 examples 时,可以不用改代码。 整体风格也能保持统一
// APIKey 是 Dify API 的认证密钥 | ||
APIKey string | ||
// Endpoint 是 Dify API 的服务地址 | ||
Endpoint string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注释里稍微说明下 default 取值
feat: add dify retriever
en: add dify retriever
zh(optional): 添加 dify retriever
#74