Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
homanp committed Feb 28, 2024
1 parent 8f3aaee commit bef43d5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion api/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from models.ingest import RequestPayload
from service.embedding import EmbeddingService, get_encoder
from service.ingest import handle_urls, handle_google_drive
from service.ingest import handle_google_drive, handle_urls
from utils.summarise import SUMMARY_SUFFIX

router = APIRouter()
Expand Down
2 changes: 1 addition & 1 deletion models/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from pydantic import BaseModel

from models.file import File
from models.vector_database import VectorDatabase
from models.google_drive import GoogleDrive
from models.vector_database import VectorDatabase


class EncoderEnum(str, Enum):
Expand Down
10 changes: 5 additions & 5 deletions service/code_interpreter.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import re
import asyncio
import logging
import time
import re
import textwrap
import time
from typing import List
from decouple import config
from openai import AsyncOpenAI
import pandas as pd

import pandas as pd
from decouple import config
from e2b import Sandbox
from openai import AsyncOpenAI

logging.getLogger("e2b").setLevel(logging.INFO)

Expand Down
2 changes: 1 addition & 1 deletion service/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from models.file import File
from models.google_drive import GoogleDrive
from models.ingest import Encoder, EncoderEnum
from utils.file import get_file_extension_from_url
from utils.logger import logger
from utils.summarise import completion
from utils.file import get_file_extension_from_url
from vectordbs import get_vector_service


Expand Down
2 changes: 1 addition & 1 deletion service/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from models.document import BaseDocumentChunk
from models.query import RequestPayload

from service.code_interpreter import CodeInterpreterService
from service.embedding import get_encoder
from utils.logger import logger
Expand Down Expand Up @@ -49,6 +48,7 @@ async def get_documents(
async with code_interpreter as service:
response = await service.run_python(code=code)
output = response.stdout
print(output)

reranked_chunks = await vector_service.rerank(query=payload.input, documents=chunks)
return reranked_chunks
Expand Down
2 changes: 1 addition & 1 deletion utils/file.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from urllib.parse import urlparse
import os
from urllib.parse import urlparse


def get_file_extension_from_url(url: str) -> str:
Expand Down

0 comments on commit bef43d5

Please sign in to comment.