Result Manager

Usage

result_manager.createOrGetDatabase()

create a connection to the couchdb server running on localhost:5984 create a database called ollama-duckdb-prompt-tracker. If it already exists, get the existing database return the database object create a connection to the couchdb server running on localhost:5984

Note

This function is used to create a connection to the couchdb server running on locally for MVP. Please overwrite this appropriately for any production workload

result_manager.store_data(data)

Get the database object from the createOrGetDatabase function and store the data in the database

Parameters:

data – data to be stored in the database

Returns:

id of the data stored in the database

result_manager.get_all_data()

Get the database object from the createOrGetDatabase function and get all the data from the database

Returns:

list of all data in the database

Return type:

list

Note

This function does not take any parameters. It is used to get all the data from the database, so some filtering and pagination will be needed

result_manager.get_data(db, id: int)

Note

This function is not implemented yet

Installation

CouchDB Installation: https://docs.couchdb.org/en/stable/install/index.html

pip install couchdb