Skip to content

Commit 065634b

Browse files
committed
expose endpoint for samples and knowledge base data
1 parent 5b4b305 commit 065634b

File tree

5 files changed

+1035
-128
lines changed

5 files changed

+1035
-128
lines changed

app/app.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ def trigger_rebuild():
101101

102102
print("Finished running get_knowledge_base.py script.")
103103

104+
# get Dockerfiles and compose files from samples repo
105+
print("Running get_samples_examples.py script...")
106+
result = subprocess.run(["python3", "get_samples_examples.py"], capture_output=True, text=True)
107+
if result.returncode != 0:
108+
print(f"Error running get_samples_examples.py script: {result.stderr}")
109+
return jsonify({"error": "Error running get_samples_examples.py script", "details": result.stderr}), 500
110+
111+
print("Finished running get_samples_examples.py script.")
112+
104113
print("Rebuilding embeddings...")
105114
try:
106115
rag_system.rebuild_embeddings()

0 commit comments

Comments
 (0)