Skip to content

Commit 3c51e67

Browse files
authored
Merge pull request #9 from Imaging-Plaza/bug-avoid-gimie-block
Hot fix for cloning issue
2 parents 83f317b + 2ae0de5 commit 3c51e67

4 files changed

Lines changed: 20 additions & 21 deletions

File tree

oasis

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 8eeb8dd0c73494eea1d6dc8f9bfe0e43953d2b99

requirements.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
pydantic
2-
python-dotenv
3-
google-genai
4-
repo-to-text
1+
pydantic==2.11.7
2+
python-dotenv==0.21.1
3+
google-genai==0.1.0
4+
repo-to-text==0.7.0
55
PyLD
6-
rdflib
7-
rdflib-jsonld
8-
tiktoken
9-
fastapi
10-
uvicorn
6+
rdflib==6.2.0
7+
rdflib-jsonld==0.6.2
8+
tiktoken==0.9.0
9+
fastapi==0.115.13
10+
uvicorn==0.34.3
1111
gimie==0.7.2
1212
pyyaml
13-
openai
14-
beautifulsoup4
15-
selenium
13+
openai==1.91.0
14+
beautifulsoup4==4.13.4
15+
selenium==4.34.2

src/api.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,14 @@ async def extract(full_path:str):
2323
jsonld_gimie_data = extract_gimie(full_path, format="json-ld")
2424

2525
try:
26-
llm_result = await llm_request_repo_infos(str(full_path), output_format="json-ld", max_tokens=20000)
27-
except Exception as e:
28-
raise HTTPException(
29-
status_code=424,
30-
detail=f"Error from LLM service: {e}"
31-
)
26+
llm_result = await llm_request_repo_infos(str(full_path), output_format="json-ld", max_tokens=30000)
27+
merged_results = merge_jsonld(jsonld_gimie_data, llm_result)
28+
pydantic_data = convert_jsonld_to_pydantic(merged_results["@graph"])
3229

33-
merged_results = merge_jsonld(jsonld_gimie_data, llm_result)
30+
except Exception as e:
3431

35-
pydantic_data = convert_jsonld_to_pydantic(merged_results["@graph"])
32+
pydantic_data = convert_jsonld_to_pydantic(jsonld_gimie_data["@graph"])
33+
print(f"Warning: LLM service failed, using fallback data: {e}")
3634

3735
zod_data = convert_pydantic_to_zod_form_dict(pydantic_data)
3836

src/core/genai_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def clone_repo(repo_url, temp_dir):
106106
logger.info(f"Cloning {repo_url} into {temp_dir}...")
107107
try:
108108
process = await asyncio.create_subprocess_exec(
109-
'git', 'clone', repo_url, temp_dir,
109+
'git', 'clone', '-c', 'core.symlinks=false', repo_url, temp_dir,
110110
stdout=asyncio.subprocess.PIPE,
111111
stderr=asyncio.subprocess.PIPE
112112
)

0 commit comments

Comments
 (0)