feat: Support gemini embeddings (text-embedding-004,embedding-001) #1475
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
close #1313
close #868
我已确认该 PR 已自测通过,相关截图如下:
(此处放上测试通过的截图,如果不涉及前端改动或从 UI 上无法看出,请放终端启动成功的截图)
模型名字在测试时有映射(google-text-embedding-004->text-embedding-004)
![image](https://private-user-images.githubusercontent.com/18144577/334296275-f7809f3e-10ae-4030-b805-596e570c0811.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyNzAyNjIsIm5iZiI6MTcyNTI2OTk2MiwicGF0aCI6Ii8xODE0NDU3Ny8zMzQyOTYyNzUtZjc4MDlmM2UtMTBhZS00MDMwLWI4MDUtNTk2ZTU3MGMwODExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAyVDA5MzkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVjY2I4OGRkZTJkNTc5YTBmMmM5NmFjNGMzMWQzNjIxNDE3ZmY4YjIzOThjNWMxZDQ5YjJiYjNmYTYxMWM3OWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.iO2GULBjIUSHRYVwocGDSG1VgLycnuCcLWJSLaRCydI)
![image](https://private-user-images.githubusercontent.com/18144577/334297603-02bb1dda-2a5a-43e8-97f1-b03a0ae28e5a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyNzAyNjIsIm5iZiI6MTcyNTI2OTk2MiwicGF0aCI6Ii8xODE0NDU3Ny8zMzQyOTc2MDMtMDJiYjFkZGEtMmE1YS00M2U4LTk3ZjEtYjAzYTBhZTI4ZTVhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAyVDA5MzkyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdkZTIzZjI4NDBlNjc1NDNlZGIwMzI4YzNkNTViZGY0MzI1YmY3YWNlNjE0ZDVhNDM0ODgxMGM2NDczYTg5YTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jm6idjcLfUIf95yohRSO2ahxpJcPiYFANL6XvYbWSxE)
多条:
单条: