mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
fix to pass api key to openai embedding (#754)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user