Skip to content
Snippets Groups Projects
Unverified Commit 43474a51 authored by Thuc Pham's avatar Thuc Pham Committed by GitHub
Browse files

feat: config llamacloud organization ID (#192)


---------
Co-authored-by: default avatarMarcus Schiesser <mail@marcusschiesser.de>
parent cf11b233
No related branches found
No related tags found
No related merge requests found
---
"create-llama": patch
---
Configure LlamaCloud organization ID for Python
...@@ -155,6 +155,11 @@ const getVectorDBEnvs = ( ...@@ -155,6 +155,11 @@ const getVectorDBEnvs = (
"The base URL for the LlamaCloud API. Only change this for non-production environments", "The base URL for the LlamaCloud API. Only change this for non-production environments",
value: "https://api.cloud.llamaindex.ai", value: "https://api.cloud.llamaindex.ai",
}, },
{
name: "LLAMA_CLOUD_ORGANIZATION_ID",
description:
"The organization ID for the LlamaCloud project (uses default organization if not specified - Python only)",
},
]; ];
case "chroma": case "chroma":
const envs = [ const envs = [
......
...@@ -121,7 +121,7 @@ const getAdditionalDependencies = ( ...@@ -121,7 +121,7 @@ const getAdditionalDependencies = (
case "llamacloud": case "llamacloud":
dependencies.push({ dependencies.push({
name: "llama-index-indices-managed-llama-cloud", name: "llama-index-indices-managed-llama-cloud",
version: "^0.2.5", version: "^0.2.7",
}); });
break; break;
} }
......
...@@ -21,6 +21,7 @@ def generate_datasource(): ...@@ -21,6 +21,7 @@ def generate_datasource():
project_name = os.getenv("LLAMA_CLOUD_PROJECT_NAME") project_name = os.getenv("LLAMA_CLOUD_PROJECT_NAME")
api_key = os.getenv("LLAMA_CLOUD_API_KEY") api_key = os.getenv("LLAMA_CLOUD_API_KEY")
base_url = os.getenv("LLAMA_CLOUD_BASE_URL") base_url = os.getenv("LLAMA_CLOUD_BASE_URL")
organization_id = os.getenv("LLAMA_CLOUD_ORGANIZATION_ID")
if name is None or project_name is None or api_key is None: if name is None or project_name is None or api_key is None:
raise ValueError( raise ValueError(
...@@ -40,6 +41,7 @@ def generate_datasource(): ...@@ -40,6 +41,7 @@ def generate_datasource():
project_name=project_name, project_name=project_name,
api_key=api_key, api_key=api_key,
base_url=base_url, base_url=base_url,
organization_id=organization_id
) )
logger.info("Finished generating the index") logger.info("Finished generating the index")
......
...@@ -11,6 +11,7 @@ def get_index(): ...@@ -11,6 +11,7 @@ def get_index():
project_name = os.getenv("LLAMA_CLOUD_PROJECT_NAME") project_name = os.getenv("LLAMA_CLOUD_PROJECT_NAME")
api_key = os.getenv("LLAMA_CLOUD_API_KEY") api_key = os.getenv("LLAMA_CLOUD_API_KEY")
base_url = os.getenv("LLAMA_CLOUD_BASE_URL") base_url = os.getenv("LLAMA_CLOUD_BASE_URL")
organization_id = os.getenv("LLAMA_CLOUD_ORGANIZATION_ID")
if name is None or project_name is None or api_key is None: if name is None or project_name is None or api_key is None:
raise ValueError( raise ValueError(
...@@ -23,6 +24,7 @@ def get_index(): ...@@ -23,6 +24,7 @@ def get_index():
project_name=project_name, project_name=project_name,
api_key=api_key, api_key=api_key,
base_url=base_url, base_url=base_url,
organization_id=organization_id
) )
return index return index
...@@ -14,7 +14,7 @@ fastapi = "^0.109.1" ...@@ -14,7 +14,7 @@ fastapi = "^0.109.1"
uvicorn = { extras = ["standard"], version = "^0.23.2" } uvicorn = { extras = ["standard"], version = "^0.23.2" }
python-dotenv = "^1.0.0" python-dotenv = "^1.0.0"
aiostream = "^0.5.2" aiostream = "^0.5.2"
llama-index = "0.10.55" llama-index = "0.10.58"
cachetools = "^5.3.3" cachetools = "^5.3.3"
[build-system] [build-system]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment