kg_chat.interface package

Submodules

kg_chat.interface.database_interface module

Interface for the Database.

class kg_chat.interface.database_interface.DatabaseInterface

Bases: ABC

Interface for the Database.

abstract clear_database()

Clear the database.

abstract create_edges(edges)

Create edges in the database.

abstract create_nodes(nodes)

Create nodes in the database.

abstract execute_query(query)

Execute a query against the database.

Return type:

Any

abstract execute_query_using_langchain(query)

Execute a query against the database using Langchain.

Return type:

str

abstract execute_unsafe_operation(operation)

Execute an unsafe operation with safety measures.

abstract get_human_response(query)

Get a human response from the database.

Return type:

str

abstract get_structured_response(query)

Get a structured response from the database.

Return type:

str

abstract is_safe_command(command)

Check if a command is safe to execute.

Return type:

bool

abstract load_kg()

Load the Knowledge Graph into the database.

abstract show_schema()

Show the schema of the database.

Return type:

str

abstract toggle_safe_mode(enabled)

Toggle safe mode on or off.

Module contents

Initialize the interface package.

class kg_chat.interface.DatabaseInterface

Bases: ABC

Interface for the Database.

abstract clear_database()

Clear the database.

abstract create_edges(edges)

Create edges in the database.

abstract create_nodes(nodes)

Create nodes in the database.

abstract execute_query(query)

Execute a query against the database.

Return type:

Any

abstract execute_query_using_langchain(query)

Execute a query against the database using Langchain.

Return type:

str

abstract execute_unsafe_operation(operation)

Execute an unsafe operation with safety measures.

abstract get_human_response(query)

Get a human response from the database.

Return type:

str

abstract get_structured_response(query)

Get a structured response from the database.

Return type:

str

abstract is_safe_command(command)

Check if a command is safe to execute.

Return type:

bool

abstract load_kg()

Load the Knowledge Graph into the database.

abstract show_schema()

Show the schema of the database.

Return type:

str

abstract toggle_safe_mode(enabled)

Toggle safe mode on or off.