Skip to content

Commit d76f888

Browse files
committed
Update auto insurance claim
1 parent bbf5f08 commit d76f888

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

auto_insurance_claim/api.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,13 @@
77

88
load_dotenv()
99

10-
# Llama cloud
11-
llama_cloud_api_key = os.getenv("LLAMA_CLOUD_API_KEY")
12-
org_id = os.getenv("ORGANIZATION_ID")
1310
# Llama cloud
1411
llama_cloud_api_key = os.getenv("LLAMA_CLOUD_API_KEY")
1512
org_id = os.getenv("ORGANIZATION_ID")
1613

1714
if not llama_cloud_api_key:
1815
raise ValueError("LLAMA_CLOUD_API_KEY environment variable is required")
1916

20-
org_id = os.getenv("ORGANIZATION_ID")
2117
if not org_id:
2218
raise ValueError("ORGANIZATION_ID environment variable is required")
2319

@@ -38,8 +34,8 @@ def llama_client():
3834
return client
3935

4036
def ollama_llm():
41-
llm = Ollama(model="llama3.1:latest", request_timeout=360.0
42-
)
37+
llm = Ollama(model="llama3.1:latest",
38+
request_timeout=360.0)
4339
return llm
4440

4541

@@ -53,7 +49,5 @@ def get_opik_tracker():
5349
project_name = os.getenv("OPIK_PROJECT_NAME")
5450
if not api_key:
5551
raise ValueError(
56-
"OPIK API KEY not set visit https://www.comet.com/opik\
57-
to set"
58-
)
52+
"OPIK API KEY not set visit https://www.comet.com/opik to set" )
5953
return api_key, opik_workspace, project_name

auto_insurance_claim/workflows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class LogEvent(Event):
3535
delta: bool = False
3636

3737

38-
def parse_claim(data: str) -> ClaimInfo:
38+
def parse_claim(file_path: str) -> ClaimInfo:
3939
import json
40-
with open(data, "r") as f:
40+
with open(file_path, "r") as f:
4141
data = json.load(f)
4242
return ClaimInfo.model_validate(data) # replace "ClaimInfo".model_validate with actual ClaimInfo class method
4343

0 commit comments

Comments
 (0)