Former-commit-id: d41469c6c53cb215e37c9097b50ad750bd28d608pull/160/head
parent
199c3b2b0d
commit
9fa96bebd6
@ -0,0 +1,11 @@
|
||||
# This file contains the function that embeds the input into a vector
|
||||
from chromadb import EmbeddingFunction
|
||||
|
||||
|
||||
def openai_embed(self, input, api_key, model_name):
|
||||
openai = EmbeddingFunction.OpenAIEmbeddingFunction(
|
||||
api_key=api_key,
|
||||
model_name=model_name
|
||||
)
|
||||
embedding = openai(input)
|
||||
return embedding
|
Loading…
Reference in new issue