pykoi package#

Subpackages#

Submodules#

pykoi.application module#

Application module.

class pykoi.application.Application(share: bool = False, debug: bool = False, username: None | str | List = None, password: None | str | List = None, host: str = '127.0.0.1', port: int = 5000, enable_telemetry: bool = True)[source]#

Bases: object

The Application class.

add_component(component: Any)[source]#

Add a component to the application.

Parameters:

component (Any) – The component to be added.

auth_required(credentials: HTTPBasicCredentials = Depends(HTTPBasic))[source]#
authenticate_user(fake_db, username: str, password: str)[source]#
create_chatbot_comparator_route(app: FastAPI, component: Dict[str, Any])[source]#

Create chatbot comparator routes for the application.

Parameters:
  • app (FastAPI) – The FastAPI application.

  • component (Dict[str, Any]) – The component for which the routes are being created.

create_chatbot_route(app: FastAPI, component: Dict[str, Any])[source]#

Create chatbot routes for the application.

Parameters:
  • app (FastAPI) – The FastAPI application.

  • component (Dict[str, Any]) – The component for which the routes are being created.

create_feedback_route(app: FastAPI, component: Dict[str, Any])[source]#

Create feedback routes for the application.

Parameters:
  • app (FastAPI) – The FastAPI application.

  • component (Dict[str, Any]) – The component for which the routes are being created.

create_nvml_route(app: FastAPI, component: Dict[str, Any])[source]#

Create NVML routes for the application.

Parameters:
  • app (FastAPI) – The FastAPI application.

  • component (Dict[str, Any]) – The component for which the routes are being created.

create_qa_retrieval_route(app: FastAPI, component: Dict[str, Any])[source]#

Create QA retrieval routes for the application.

Parameters:
  • app (FastAPI) – The FastAPI application.

  • component (Dict[str, Any]) – The component for which the routes are being created.

display()[source]#

Run the application.

dummy_auth()[source]#
get_auth_dependency()[source]#
run()[source]#

Run the application.

class pykoi.application.ComparatorInsertRequest(*, data: List[ModelAnswer])[source]#

Bases: BaseModel

data: List[ModelAnswer]#
class pykoi.application.InferenceRankingTable(*, n: int | None = 2)[source]#

Bases: BaseModel

n: int | None#
class pykoi.application.ModelAnswer(*, model: str, qid: int, rank: int, answer: str)[source]#

Bases: BaseModel

answer: str#
model: str#
qid: int#
rank: int#
class pykoi.application.RankingTableUpdate(*, question: str, up_ranking_answer: str, low_ranking_answer: str)[source]#

Bases: BaseModel

low_ranking_answer: str#
question: str#
up_ranking_answer: str#
class pykoi.application.UpdateQATable(*, id: int, vote_status: str)[source]#

Bases: BaseModel

id: int#
vote_status: str#
class pykoi.application.UserInDB(username: str, hashed_password: str)[source]#

Bases: object

pykoi.state module#

class pykoi.state.State[source]#

Bases: object

class pykoi.state.Store[source]#

Bases: State

count = 4#
decrement()[source]#
hello()[source]#
increment()[source]#
name = 'jared'#

Module contents#