mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix to pass api key to openai embedding (#754)
This commit is contained in:
parent
a202b2550f
commit
da12d70bc2
@ -21,7 +21,8 @@ if embedding_strategy == "llama2":
|
||||
elif embedding_strategy == "openai":
|
||||
from llama_index.embeddings.openai import OpenAIEmbedding
|
||||
embed_model = OpenAIEmbedding(
|
||||
model="text-embedding-ada-002"
|
||||
model="text-embedding-ada-002",
|
||||
api_key=config.get_or_error("LLM_API_KEY")
|
||||
)
|
||||
elif embedding_strategy == "azureopenai":
|
||||
from llama_index.embeddings.azure_openai import AzureOpenAIEmbedding # Need to instruct to set these env variables in documentation
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user