Skip to content

Commit b555eeb

Browse files
authored
fix: make project id optional (#35)
1 parent a5f122a commit b555eeb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/{{ project_name_snake }}/config.py.jinja

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,7 @@ def get_llama_cloud_client():
6969
return AsyncLlamaCloud(
7070
base_url=base_url,
7171
token=api_key,
72-
httpx_client=httpx.AsyncClient(timeout=60, headers={"Project-Id": project_id}),
72+
httpx_client=httpx.AsyncClient(
73+
timeout=60, headers={"Project-Id": project_id} if project_id else None
74+
),
7375
)

test-proj/src/test_proj/config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,7 @@ def get_llama_cloud_client():
6969
return AsyncLlamaCloud(
7070
base_url=base_url,
7171
token=api_key,
72-
httpx_client=httpx.AsyncClient(timeout=60, headers={"Project-Id": project_id}),
72+
httpx_client=httpx.AsyncClient(
73+
timeout=60, headers={"Project-Id": project_id} if project_id else None
74+
),
7375
)

0 commit comments

Comments
 (0)