()
| 59 | from RAGHelper import RAGHelper |
| 60 | db_pool = pool.SimpleConnectionPool( |
| 61 | minconn=1, |
| 62 | maxconn=10, |
| 63 | dsn=os.getenv("postgres_uri") |
| 64 | ) |
| 65 | logger.info("Instantiating RAG helper.") |
| 66 | raghelper = RAGHelper(logger, db_pool) |
| 67 | |
| 68 | bootstrap() |
| 69 | |
| 70 | @app.route("/create_title", methods=['POST']) |
| 71 | def create_title(): |
| 72 | json_data = request.get_json() |
| 73 | question = json_data.get('question') |
| 74 | |
| 75 | (response, _) = raghelper.llm.generate_response( |
nothing calls this directly
no test coverage detected