Skip to content

Commit

Permalink
fastapi
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed May 6, 2024
1 parent 0e4cd45 commit 8bbe1ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion setup.py
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages

# Define your base version
version = '0.50.11'
version = '0.50.12'

setup(
name='sunholo',
Expand Down
10 changes: 7 additions & 3 deletions sunholo/agents/fastapi/qna_routes.py
@@ -1,5 +1,9 @@
from fastapi import FastAPI, Request, Response, APIRouter
from fastapi.responses import StreamingResponse, JSONResponse
try:
from fastapi import FastAPI, Request, Response, APIRouter
from fastapi.responses import StreamingResponse, JSONResponse
except ImportError:
FastAPI = None

import json
import traceback
import asyncio
Expand Down Expand Up @@ -78,7 +82,7 @@ async def process_qna(vector_name: str, request: VACRequest):
return JSONResponse(content=bot_output)
return process_qna

def register_qna_fastapi_routes(app: FastAPI, stream_interpreter, qna_interpreter):
def register_qna_fastapi_routes(app, stream_interpreter, qna_interpreter):
router = APIRouter()

# Register your routes on the router
Expand Down
2 changes: 1 addition & 1 deletion sunholo/database/alloydb.py
Expand Up @@ -9,7 +9,7 @@
from langchain_google_alloydb_pg import AlloyDBEngine, Column, AlloyDBLoader, AlloyDBDocumentSaver
from google.cloud.alloydb.connector import IPTypes
except ImportError as err:
print(f"No AlloyDBEngine: {str(err)}")
print(f"No AlloyDBEngine: {str(err)} - install via `pip install sunholo['database']`")

from .database import get_vector_size
from ..logging import log
Expand Down

0 comments on commit 8bbe1ae

Please sign in to comment.