This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from vertexai.preview.generative_models import GenerativeModel, Part | |
| from app.common.config import Settings | |
| from app.llm.vertex_init import init_vertex | |
| def generate( | |
| settings: Settings, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __pycache__ | |
| *.pyc | |
| *.pyo | |
| *.pyd | |
| .Python | |
| .venv | |
| venv | |
| .git | |
| .pytest_cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM python:3.11-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fastapi==0.115.0 | |
| uvicorn[standard]==0.30.6 | |
| google-cloud-bigquery==3.25.0 | |
| google-cloud-core==2.4.1 | |
| google-cloud-aiplatform==1.67.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fastapi==0.115.0 | |
| uvicorn[standard]==0.30.6 | |
| google-cloud-bigquery==3.25.0 | |
| google-cloud-core==2.4.1 | |
| google-cloud-aiplatform==1.67.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from vertexai.preview.generative_models import Part | |
| from app.common.config import Settings | |
| from app.llm.gemini_client import generate | |
| from app.retrieval.retriever import Retriever | |
| def build_augmented_prompt(prompt: str, *, top_notes: list[dict]) -> str: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from typing import List | |
| from google.cloud import bigquery | |
| from app.common.config import Settings | |
| from app.retrieval.types import Note | |
| class BigQueryNotesRepository: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| import logging | |
| from typing import List | |
| from app.common.config import Settings | |
| from app.llm.embeddings import embed_text | |
| from app.retrieval.retriever import Retriever | |
| from app.retrieval.types import Note | |
| from app.retrieval.utils import cosine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from typing import List | |
| from app.retrieval.types import Note | |
| class Retriever(ABC): | |
| @abstractmethod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from __future__ import annotations | |
| from abc import ABC, abstractmethod | |
| from typing import List | |
| from app.retrieval.types import Note | |
| class Retriever(ABC): | |
| @abstractmethod |
NewerOlder