-
Notifications
You must be signed in to change notification settings - Fork 533
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
Add cohere embedding for ai-cache #1563
base: main
Are you sure you want to change the base?
Conversation
ayanami-desu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
||
func (c *cohereProviderInitializer) CreateConfig(json gjson.Result) { | ||
cohereConfig.apiKey = json.Get("apiKey").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.
奇怪的空行
// EmbeddingTypes string | ||
// Texts []string | ||
// Images []string | ||
// Truncate 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.
这些注释掉的参数可以删掉吗
} | ||
|
||
headers := [][2]string{ | ||
{"Authorization", fmt.Sprintf("BEARER %s", cohereConfig.apiKey)}, |
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.
BEARER 应该是小写吧
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.
) | ||
|
||
type providerInitializer interface { | ||
ValidateConfig(ProviderConfig) error | ||
CreateConfig(json gjson.Result) |
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.
方法叫 Create,但没有返回值,很奇怪
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.
因为这个方法是初始化全局变量。不合适的话我再改改
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
fixes #1449
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
docker-compose.yml
envoy.yaml
Ⅴ. Special notes for reviews