Skip to content
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 method convert str to embedding model enum #503

Open
warjiang opened this issue Sep 29, 2023 · 1 comment
Open

Add method convert str to embedding model enum #503

warjiang opened this issue Sep 29, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@warjiang
Copy link

Want featurs like

ConvertStr2EmbeddingModel("text-embedding-ada-002") 
// return openai.AdaEmbeddingV2
@henomis
Copy link
Contributor

henomis commented Oct 5, 2023

You can use this:

var m openai.EmbeddingModel
m.UnmarshalText([]byte("text-similarity-ada-002"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants