Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions oasis
Submodule oasis added at 8eeb8d
24 changes: 12 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
pydantic
python-dotenv
google-genai
repo-to-text
pydantic==2.11.7
python-dotenv==0.21.1
google-genai==0.1.0
repo-to-text==0.7.0
PyLD
rdflib
rdflib-jsonld
tiktoken
fastapi
uvicorn
rdflib==6.2.0
rdflib-jsonld==0.6.2
tiktoken==0.9.0
fastapi==0.115.13
uvicorn==0.34.3
gimie==0.7.2
pyyaml
openai
beautifulsoup4
selenium
openai==1.91.0
beautifulsoup4==4.13.4
selenium==4.34.2
14 changes: 6 additions & 8 deletions src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ async def extract(full_path:str):
jsonld_gimie_data = extract_gimie(full_path, format="json-ld")

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

merged_results = merge_jsonld(jsonld_gimie_data, llm_result)
except Exception as e:

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

zod_data = convert_pydantic_to_zod_form_dict(pydantic_data)

Expand Down
2 changes: 1 addition & 1 deletion src/core/genai_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def clone_repo(repo_url, temp_dir):
logger.info(f"Cloning {repo_url} into {temp_dir}...")
try:
process = await asyncio.create_subprocess_exec(
'git', 'clone', repo_url, temp_dir,
'git', 'clone', '-c', 'core.symlinks=false', repo_url, temp_dir,
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE
)
Expand Down
Loading