Skip to content

Commit 4f1eb8b

Browse files
authored
Merge pull request #31 from ProspektStudio/david
Disable CAG
2 parents 906c98e + b306e25 commit 4f1eb8b

42 files changed

Lines changed: 29 additions & 27 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# dependencies
2-
/node_modules
2+
client/node_modules
33
/.pnp
44
.pnp.js
55

66
# testing
77
/coverage
88

99
# next.js
10-
/.next/
11-
/out/
10+
client/.next/
11+
client/out/
1212

1313
# python
1414
__pycache__

api/main.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ async def get_satellite_info_rag(
4646
)
4747

4848

49-
@app.get("/api/satellite-info-cag")
50-
async def get_satellite_info_cag(
51-
group: str = Query(..., min_length=1, max_length=50),
52-
name: str = Query(..., min_length=1, max_length=50)
53-
):
54-
return StreamingResponse(
55-
generate_satellite_info_stream(name, cag_content_stream),
56-
media_type="text/event-stream"
57-
)
49+
# @app.get("/api/satellite-info-cag")
50+
# async def get_satellite_info_cag(
51+
# group: str = Query(..., min_length=1, max_length=50),
52+
# name: str = Query(..., min_length=1, max_length=50)
53+
# ):
54+
# return StreamingResponse(
55+
# generate_satellite_info_stream(name, cag_content_stream),
56+
# media_type="text/event-stream"
57+
# )
5858

5959

6060
async def generate_satellite_info_stream(name: str, content_stream_func: Callable[[str], AsyncGenerator[str, None]]):

api/models/__init__.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,15 @@ async def rag_content_stream(name: str):
5555
if chunk:
5656
yield chunk
5757

58-
cag_satellite_agent = CagAgent(
59-
base_prompt=BASE_PROMPT,
60-
llm_model=GEMINI_MODEL,
61-
)
62-
63-
async def cag_content_stream(name: str):
64-
prompt = generate_prompt(name)
65-
async for chunk in cag_satellite_agent.ask(prompt):
66-
if chunk:
67-
yield chunk
58+
# CAG Agent Config
59+
60+
# cag_satellite_agent = CagAgent(
61+
# base_prompt=BASE_PROMPT,
62+
# llm_model=GEMINI_MODEL,
63+
# )
64+
65+
# async def cag_content_stream(name: str):
66+
# prompt = generate_prompt(name)
67+
# async for chunk in cag_satellite_agent.ask(prompt):
68+
# if chunk:
69+
# yield chunk

api/models/cag_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from google.genai import types
88
from .doc_loader import load_webpages
99

10-
logger = logging.getLogger(__name__)
10+
logger = logging.getLogger("uvicorn")
1111

1212
LLM_TEMPERATURE = 0.0
1313

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ const agentInfo: Record<string, { name: string; description: string }> = {
2626
name: 'Retrieval Augmented Generation',
2727
description: "Retrieval Augmented Generation (RAG) implementation uses Google's Vertex AI for embeddings and Gemini 2.0 Flash as the LLM, with LangChain providing the framework. The system loads satellite-related documents, processes them into chunks, stores them in an in-memory vector store, and retrieves relevant information and generates satellite information.",
2828
},
29-
[Agent.CAG]: {
30-
name: 'Cache-Augmented Generation',
31-
description: "Cache-Augmented Generation (CAG) implementation uses caching to store satellite-related documents and retrieve relevant information and generates satellite information.",
32-
},
29+
// [Agent.CAG]: {
30+
// name: 'Cache-Augmented Generation',
31+
// description: "Cache-Augmented Generation (CAG) implementation uses caching to store satellite-related documents and retrieve relevant information and generates satellite information.",
32+
// },
3333
}
3434

3535
const AiInfo: React.FC<AiInfoProps> = ({ selectedSatellite }) => {

0 commit comments

Comments
 (0)