SYMBOL INDEX (1642 symbols across 212 files) FILE: docs/scripts/generate_examples_docs.py function generate_docs_for_examples_readme (line 17) | def generate_docs_for_examples_readme( FILE: docs/scripts/generate_reference_docs.py function generate_docs_for_src_code (line 19) | def generate_docs_for_src_code( FILE: docs/theme/assets/pymdownx-extras/extra-loader-MCFnu0Wd.js function _typeof (line 1) | function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==... function t (line 1) | function t(){t=function(){return r};var e,r={},n=Object.prototype,o=n.ha... function e (line 1) | function e(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return vo... function r (line 1) | function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a ... function n (line 1) | function n(t,e){for(var r=0;r None: method run (line 55) | def run(self, *args, **kwargs) -> AgentOutput | list[AgentOutput]: FILE: libs/kotaemon/kotaemon/agents/io/base.py function check_log (line 13) | def check_log(): class AgentType (line 22) | class AgentType(Enum): class BaseScratchPad (line 36) | class BaseScratchPad: method __init__ (line 93) | def __init__(self): method stop (line 101) | def stop(self): method update_status (line 106) | def update_status(self, output: str, **kwargs): method thinking (line 113) | def thinking(self, name: str): method done (line 120) | def done(self, _all=False): method stream_print (line 128) | def stream_print(self, item: str): method json_print (line 133) | def json_print(self, item: Dict[str, Any]): method panel_print (line 140) | def panel_print(self, item: Any, title: str = "Output", stream: bool =... method clear (line 158) | def clear(self): method print (line 163) | def print(self, content: str, **kwargs): method format_json (line 171) | def format_json(self, json_obj: str): method debug (line 178) | def debug(self, content: str, **kwargs): method info (line 185) | def info(self, content: str, **kwargs): method warning (line 192) | def warning(self, content: str, **kwargs): method error (line 199) | def error(self, content: str, **kwargs): method critical (line 206) | def critical(self, content: str, **kwargs): class AgentAction (line 215) | class AgentAction: class AgentFinish (line 229) | class AgentFinish(NamedTuple): class AgentOutput (line 241) | class AgentOutput(LLMInterface): FILE: libs/kotaemon/kotaemon/agents/langchain_based.py class LangchainAgent (line 14) | class LangchainAgent(BaseAgent): method __init__ (line 28) | def __init__(self, *args, **kwargs): method update_agent_tools (line 37) | def update_agent_tools(self): method add_tools (line 62) | def add_tools(self, tools: List[BaseTool]) -> None: method run (line 67) | def run(self, instruction: str) -> AgentOutput: FILE: libs/kotaemon/kotaemon/agents/react/agent.py class ReactAgent (line 18) | class ReactAgent(BaseAgent): method _compose_plugin_description (line 48) | def _compose_plugin_description(self) -> str: method _construct_scratchpad (line 64) | def _construct_scratchpad( method _parse_output (line 74) | def _parse_output(self, text: str) -> Optional[AgentAction | AgentFini... method _compose_prompt (line 116) | def _compose_prompt(self, instruction) -> str: method _format_function_map (line 135) | def _format_function_map(self) -> dict[str, BaseTool]: method _trim (line 147) | def _trim(self, text: str | Document) -> str: method clear (line 175) | def clear(self): method run (line 181) | def run(self, instruction, max_iterations=None) -> AgentOutput: method stream (line 258) | def stream(self, instruction, max_iterations=None): FILE: libs/kotaemon/kotaemon/agents/rewoo/agent.py class RewooAgent (line 22) | class RewooAgent(BaseAgent): method planner (line 49) | def planner(self): method solver (line 58) | def solver(self): method _parse_plan_map (line 66) | def _parse_plan_map( method _parse_planner_evidences (line 108) | def _parse_planner_evidences( method _run_plugin (line 153) | def _run_plugin( method _get_worker_evidence (line 194) | def _get_worker_evidence( method _find_plugin (line 240) | def _find_plugin(self, name: str): method _trim_evidence (line 245) | def _trim_evidence(self, evidence: str): method run (line 267) | def run(self, instruction: str, use_citation: bool = False) -> AgentOu... method stream (line 312) | def stream(self, instruction: str, use_citation: bool = False): FILE: libs/kotaemon/kotaemon/agents/rewoo/planner.py class Planner (line 11) | class Planner(BaseComponent): method _compose_worker_description (line 17) | def _compose_worker_description(self) -> str: method _compose_fewshot_prompt (line 33) | def _compose_fewshot_prompt(self) -> str: method _compose_prompt (line 41) | def _compose_prompt(self, instruction) -> str: method run (line 70) | def run(self, instruction: str, output: BaseScratchPad = BaseScratchPa... method stream (line 85) | def stream(self, instruction: str, output: BaseScratchPad = BaseScratc... FILE: libs/kotaemon/kotaemon/agents/rewoo/solver.py class Solver (line 10) | class Solver(BaseComponent): method _compose_fewshot_prompt (line 16) | def _compose_fewshot_prompt(self) -> str: method _compose_prompt (line 24) | def _compose_prompt(self, instruction, plan_evidence, output_lang) -> ... method run (line 56) | def run( method stream (line 76) | def stream( FILE: libs/kotaemon/kotaemon/agents/tools/base.py class ToolException (line 9) | class ToolException(Exception): class BaseTool (line 19) | class BaseTool(BaseComponent): method _parse_input (line 36) | def _parse_input( method _run_tool (line 53) | def _run_tool( method _to_args_and_kwargs (line 61) | def _to_args_and_kwargs(self, tool_input: Union[str, Dict]) -> Tuple[T... method _handle_tool_error (line 69) | def _handle_tool_error(self, e: ToolException) -> Any: method to_langchain_format (line 90) | def to_langchain_format(self) -> LCTool: method run (line 94) | def run( method from_langchain_format (line 114) | def from_langchain_format(cls, langchain_tool: LCTool) -> "BaseTool": class ComponentTool (line 123) | class ComponentTool(BaseTool): method _run_tool (line 134) | def _run_tool(self, *args: Any, **kwargs: Any) -> Any: FILE: libs/kotaemon/kotaemon/agents/tools/google.py class GoogleSearchArgs (line 10) | class GoogleSearchArgs(BaseModel): class GoogleSearchTool (line 14) | class GoogleSearchTool(BaseTool): method _run_tool (line 22) | def _run_tool(self, query: AnyStr) -> str: class SerpTool (line 45) | class SerpTool(BaseTool): method _run_tool (line 53) | def _run_tool(self, query: AnyStr) -> str: FILE: libs/kotaemon/kotaemon/agents/tools/llm.py class LLMArgs (line 11) | class LLMArgs(BaseModel): class LLMTool (line 15) | class LLMTool(BaseTool): method _run_tool (line 27) | def _run_tool(self, query: AnyStr) -> str: FILE: libs/kotaemon/kotaemon/agents/tools/mcp.py function _json_schema_type_to_python (line 30) | def _json_schema_type_to_python(json_type: str) -> type: function build_args_model (line 43) | def build_args_model(tool_name: str, input_schema: dict) -> Type[BaseMod... function parse_mcp_config (line 69) | def parse_mcp_config(config: dict) -> dict: function _make_tool (line 102) | def _make_tool(parsed: dict, tool_info: Any) -> "MCPTool": function _async_discover_tools (line 121) | async def _async_discover_tools(parsed: dict) -> list["MCPTool"]: function _run_async (line 153) | def _run_async(coro: Any) -> Any: function create_tools_from_config (line 168) | def create_tools_from_config( function async_discover_tools_info (line 191) | async def async_discover_tools_info(config: dict) -> list[dict]: function discover_tools_info (line 238) | def discover_tools_info(config: dict) -> list[dict]: function format_tool_list (line 243) | def format_tool_list( class MCPTool (line 282) | class MCPTool(BaseTool): method _run_tool (line 314) | def _run_tool(self, *args: Any, **kwargs: Any) -> str: method _arun_tool (line 318) | async def _arun_tool(self, *args: Any, **kwargs: Any) -> str: method _format_result (line 367) | def _format_result(self, result: Any) -> str: FILE: libs/kotaemon/kotaemon/agents/tools/wikipedia.py class Wiki (line 10) | class Wiki: method __init__ (line 13) | def __init__(self) -> None: method search (line 23) | def search(self, search: str) -> Union[str, Document]: class WikipediaArgs (line 44) | class WikipediaArgs(BaseModel): class WikipediaTool (line 48) | class WikipediaTool(BaseTool): method _run_tool (line 61) | def _run_tool(self, query: AnyStr) -> AnyStr: FILE: libs/kotaemon/kotaemon/agents/utils.py function get_plugin_response_content (line 4) | def get_plugin_response_content(output) -> str: function calculate_cost (line 14) | def calculate_cost(model_name: str, prompt_token: int, completion_token:... FILE: libs/kotaemon/kotaemon/base/component.py class BaseComponent (line 9) | class BaseComponent(Function): method flow (line 24) | def flow(self): method set_output_queue (line 35) | def set_output_queue(self, queue): method report_output (line 42) | def report_output(self, output: Optional[Document]): method invoke (line 46) | def invoke(self, *args, **kwargs) -> Document | list[Document] | None: method ainvoke (line 49) | async def ainvoke(self, *args, **kwargs) -> Document | list[Document] ... method stream (line 52) | def stream(self, *args, **kwargs) -> Iterator[Document] | None: method astream (line 55) | def astream(self, *args, **kwargs) -> AsyncGenerator[Document, None] |... method run (line 59) | def run( FILE: libs/kotaemon/kotaemon/base/schema.py class Document (line 21) | class Document(BaseDocument): method __init__ (line 43) | def __init__(self, content: Optional[Any] = None, *args, **kwargs): method __bool__ (line 64) | def __bool__(self): method example (line 68) | def example(cls) -> "Document": method to_haystack_format (line 75) | def to_haystack_format(self) -> "HaystackDocument": method __str__ (line 83) | def __str__(self): class DocumentWithEmbedding (line 87) | class DocumentWithEmbedding(Document): method __init__ (line 93) | def __init__(self, embedding: list[float], *args, **kwargs): class BaseMessage (line 98) | class BaseMessage(Document): method __add__ (line 99) | def __add__(self, other: Any): method to_openai_format (line 102) | def to_openai_format(self) -> "ChatCompletionMessageParam": class SystemMessage (line 106) | class SystemMessage(BaseMessage, LCSystemMessage): method to_openai_format (line 107) | def to_openai_format(self) -> "ChatCompletionMessageParam": class AIMessage (line 111) | class AIMessage(BaseMessage, LCAIMessage): method to_openai_format (line 112) | def to_openai_format(self) -> "ChatCompletionMessageParam": class HumanMessage (line 116) | class HumanMessage(BaseMessage, LCHumanMessage): method to_openai_format (line 117) | def to_openai_format(self) -> "ChatCompletionMessageParam": class RetrievedDocument (line 121) | class RetrievedDocument(Document): class LLMInterface (line 135) | class LLMInterface(AIMessage): class StructuredOutputLLMInterface (line 146) | class StructuredOutputLLMInterface(LLMInterface): class ExtractorOutput (line 151) | class ExtractorOutput(Document): FILE: libs/kotaemon/kotaemon/chatbot/base.py class BaseChatBot (line 10) | class BaseChatBot(BaseComponent): method run (line 12) | def run(self, messages: List[BaseMessage]) -> LLMInterface: function session_chat_storage (line 16) | def session_chat_storage(obj): class ChatConversation (line 21) | class ChatConversation(SessionFunction): class Config (line 29) | class Config: method __init__ (line 35) | def __init__(self, *args, **kwargs): method run (line 42) | def run(self, message: HumanMessage) -> Optional[BaseMessage]: method start_session (line 64) | def start_session(self): method end_session (line 71) | def end_session(self): method check_end (line 75) | def check_end( method terminal_session (line 87) | def terminal_session(self): method history (line 109) | def history(self): method history (line 113) | def history(self, value): FILE: libs/kotaemon/kotaemon/chatbot/simple_respondent.py class SimpleRespondentChatbot (line 5) | class SimpleRespondentChatbot(BaseChatBot): method _get_message (line 10) | def _get_message(self) -> str: FILE: libs/kotaemon/kotaemon/cli.py function check_config_format (line 9) | def check_config_format(config): function main (line 20) | def main(): function promptui (line 25) | def promptui(): function export (line 35) | def export(export_path, output): function run (line 81) | def run(run_path, share, username, password, appname, port): function makedoc (line 150) | def makedoc(module, output, separation_level): function start_project (line 173) | def start_project(template): FILE: libs/kotaemon/kotaemon/contribs/docs.py function from_definition_to_markdown (line 7) | def from_definition_to_markdown(definition: dict) -> str: function make_doc (line 40) | def make_doc(module: str, output: str, separation_level: int): FILE: libs/kotaemon/kotaemon/contribs/promptui/base.py function get_component (line 23) | def get_component(component_def: dict) -> gr.components.Component: FILE: libs/kotaemon/kotaemon/contribs/promptui/config.py function config_from_value (line 14) | def config_from_value(value: Any) -> dict: function handle_param (line 32) | def handle_param(param: dict) -> dict: function handle_node (line 63) | def handle_node(node: dict) -> dict: function handle_input (line 85) | def handle_input(pipeline: Union[BaseComponent, Type[BaseComponent]]) ->... function export_pipeline_to_config (line 113) | def export_pipeline_to_config( FILE: libs/kotaemon/kotaemon/contribs/promptui/export.py function from_log_to_dict (line 17) | def from_log_to_dict(pipeline_cls: Type[BaseComponent], log_config: dict... function export (line 80) | def export(config: dict, pipeline_def, output_path): function export_from_dict (line 99) | def export_from_dict( FILE: libs/kotaemon/kotaemon/contribs/promptui/logs.py class ResultLog (line 1) | class ResultLog: method _get_input (line 11) | def _get_input(obj): method _get_output (line 15) | def _get_output(obj): FILE: libs/kotaemon/kotaemon/contribs/promptui/themes.py class John (line 9) | class John(Base): method __init__ (line 10) | def __init__( FILE: libs/kotaemon/kotaemon/contribs/promptui/tunnel.py class Tunnel (line 31) | class Tunnel: method __init__ (line 32) | def __init__(self, appname, username, local_port): method download_binary (line 40) | def download_binary(): method run (line 68) | def run(self) -> str: method kill (line 77) | def kill(self): method _start_tunnel (line 83) | def _start_tunnel(self, binary: str) -> str: FILE: libs/kotaemon/kotaemon/contribs/promptui/ui/__init__.py function build_from_dict (line 12) | def build_from_dict(config: Union[str, dict]): FILE: libs/kotaemon/kotaemon/contribs/promptui/ui/blocks.py class ChatBlock (line 13) | class ChatBlock(ChatInterface): method __init__ (line 20) | def __init__( method _submit_fn (line 37) | async def _submit_fn( method _stream_fn (line 71) | async def _stream_fn( method _display_input (line 79) | def _display_input( method _setup_events (line 87) | def _setup_events(self) -> None: method _setup_api (line 173) | def _setup_api(self) -> None: FILE: libs/kotaemon/kotaemon/contribs/promptui/ui/chat.py function construct_chat_ui (line 46) | def construct_chat_ui( function build_chat_ui (line 155) | def build_chat_ui(config, pipeline_def): FILE: libs/kotaemon/kotaemon/contribs/promptui/ui/pipeline.py function construct_pipeline_ui (line 41) | def construct_pipeline_ui( function load_saved_params (line 129) | def load_saved_params(path: str) -> Dict: function build_pipeline_ui (line 146) | def build_pipeline_ui(config: dict, pipeline_def): FILE: libs/kotaemon/kotaemon/embeddings/base.py class BaseEmbeddings (line 6) | class BaseEmbeddings(BaseComponent): method run (line 7) | def run( method invoke (line 12) | def invoke( method ainvoke (line 17) | async def ainvoke( method prepare_input (line 22) | def prepare_input( FILE: libs/kotaemon/kotaemon/embeddings/endpoint_based.py class EndpointEmbeddings (line 8) | class EndpointEmbeddings(BaseEmbeddings): method run (line 18) | def run( FILE: libs/kotaemon/kotaemon/embeddings/fastembed.py class FastEmbedEmbeddings (line 11) | class FastEmbedEmbeddings(BaseEmbeddings): method client_ (line 43) | def client_(self) -> "TextEmbedding": method invoke (line 51) | def invoke( method ainvoke (line 68) | async def ainvoke( FILE: libs/kotaemon/kotaemon/embeddings/langchain_based.py class LCEmbeddingMixin (line 8) | class LCEmbeddingMixin: method _get_lc_class (line 9) | def _get_lc_class(self): method __init__ (line 14) | def __init__(self, **params): method run (line 21) | def run(self, text): method __repr__ (line 32) | def __repr__(self): method __str__ (line 40) | def __str__(self): method __setattr__ (line 50) | def __setattr__(self, name, value): method __getattr__ (line 60) | def __getattr__(self, name): method dump (line 65) | def dump(self, *args, **kwargs): method specs (line 74) | def specs(self, path: str): class LCOpenAIEmbeddings (line 89) | class LCOpenAIEmbeddings(LCEmbeddingMixin, BaseEmbeddings): method __init__ (line 92) | def __init__( method _get_lc_class (line 112) | def _get_lc_class(self): class LCAzureOpenAIEmbeddings (line 121) | class LCAzureOpenAIEmbeddings(LCEmbeddingMixin, BaseEmbeddings): method __init__ (line 124) | def __init__( method _get_lc_class (line 142) | def _get_lc_class(self): class LCCohereEmbeddings (line 151) | class LCCohereEmbeddings(LCEmbeddingMixin, BaseEmbeddings): method __init__ (line 168) | def __init__( method _get_lc_class (line 184) | def _get_lc_class(self): class LCHuggingFaceEmbeddings (line 193) | class LCHuggingFaceEmbeddings(LCEmbeddingMixin, BaseEmbeddings): method __init__ (line 205) | def __init__( method _get_lc_class (line 215) | def _get_lc_class(self): class LCGoogleEmbeddings (line 224) | class LCGoogleEmbeddings(LCEmbeddingMixin, BaseEmbeddings): method __init__ (line 238) | def __init__( method _get_lc_class (line 250) | def _get_lc_class(self): class LCMistralEmbeddings (line 259) | class LCMistralEmbeddings(LCEmbeddingMixin, BaseEmbeddings): method __init__ (line 273) | def __init__( method _get_lc_class (line 285) | def _get_lc_class(self): FILE: libs/kotaemon/kotaemon/embeddings/openai.py function split_text_by_chunk_size (line 20) | def split_text_by_chunk_size(text: str, chunk_size: int) -> list[list[in... class BaseOpenAIEmbeddings (line 38) | class BaseOpenAIEmbeddings(BaseEmbeddings): method max_retries_ (line 68) | def max_retries_(self): method prepare_client (line 75) | def prepare_client(self, async_version: bool = False): method openai_response (line 83) | def openai_response(self, client, **kwargs): method invoke (line 87) | def invoke( method ainvoke (line 127) | async def ainvoke( class OpenAIEmbeddings (line 142) | class OpenAIEmbeddings(BaseOpenAIEmbeddings): method prepare_client (line 156) | def prepare_client(self, async_version: bool = False): method openai_response (line 185) | def openai_response(self, client, **kwargs): class AzureOpenAIEmbeddings (line 197) | class AzureOpenAIEmbeddings(BaseOpenAIEmbeddings): method azure_ad_token_provider_ (line 213) | def azure_ad_token_provider_(self): method prepare_client (line 217) | def prepare_client(self, async_version: bool = False): method openai_response (line 248) | def openai_response(self, client, **kwargs): FILE: libs/kotaemon/kotaemon/embeddings/tei_endpoint_embed.py class TeiEndpointEmbeddings (line 11) | class TeiEndpointEmbeddings(BaseEmbeddings): method client_ (line 35) | async def client_(self, inputs: list[str]): method ainvoke (line 48) | async def ainvoke( method invoke (line 74) | def invoke( FILE: libs/kotaemon/kotaemon/embeddings/voyageai.py function _import_voyageai (line 13) | def _import_voyageai(): function _format_output (line 20) | def _format_output(texts: list[str], embeddings: list[list]): class VoyageAIEmbeddings (line 32) | class VoyageAIEmbeddings(BaseEmbeddings): method __init__ (line 46) | def __init__(self, *args, **kwargs): method invoke (line 54) | def invoke( method ainvoke (line 61) | async def ainvoke( FILE: libs/kotaemon/kotaemon/indices/base.py class DocTransformer (line 11) | class DocTransformer(BaseComponent): method run (line 21) | def run( class LlamaIndexDocTransformerMixin (line 29) | class LlamaIndexDocTransformerMixin: method _get_li_class (line 44) | def _get_li_class(self) -> Type[NodeParser]: method __init__ (line 49) | def __init__(self, **params): method __repr__ (line 55) | def __repr__(self): method __str__ (line 63) | def __str__(self): method __setattr__ (line 73) | def __setattr__(self, name: str, value: Any) -> None: method __getattr__ (line 80) | def __getattr__(self, name: str) -> Any: method dump (line 85) | def dump(self, *args, **kwargs): method run (line 94) | def run( class BaseIndexing (line 106) | class BaseIndexing(BaseComponent): method to_retrieval_pipeline (line 109) | def to_retrieval_pipeline(self, **kwargs): method to_qa_pipeline (line 113) | def to_qa_pipeline(self, **kwargs): class BaseRetrieval (line 118) | class BaseRetrieval(BaseComponent): method run (line 122) | def run(self, *args, **kwargs) -> list[RetrievedDocument]: FILE: libs/kotaemon/kotaemon/indices/extractors/doc_parsers.py class BaseDocParser (line 4) | class BaseDocParser(DocTransformer): class TitleExtractor (line 8) | class TitleExtractor(LlamaIndexDocTransformerMixin, BaseDocParser): method __init__ (line 9) | def __init__( method _get_li_class (line 17) | def _get_li_class(self): class SummaryExtractor (line 23) | class SummaryExtractor(LlamaIndexDocTransformerMixin, BaseDocParser): method __init__ (line 24) | def __init__( method _get_li_class (line 32) | def _get_li_class(self): FILE: libs/kotaemon/kotaemon/indices/ingests/files.py class DocumentIngestor (line 61) | class DocumentIngestor(BaseComponent): method _get_reader (line 90) | def _get_reader(self, input_files: list[str | Path]): method run (line 114) | def run(self, file_paths: list[str | Path] | str | Path) -> list[Docum... FILE: libs/kotaemon/kotaemon/indices/qa/citation.py class CiteEvidence (line 10) | class CiteEvidence(BaseModel): class CitationPipeline (line 22) | class CitationPipeline(BaseComponent): method run (line 28) | def run(self, context: str, question: str): method prepare_llm (line 31) | def prepare_llm(self, context: str, question: str): method invoke (line 67) | def invoke(self, context: str, question: str): method ainvoke (line 97) | async def ainvoke(self, context: str, question: str): FILE: libs/kotaemon/kotaemon/indices/qa/citation_qa.py class AnswerWithContextPipeline (line 83) | class AnswerWithContextPipeline(BaseComponent): method get_prompt (line 121) | def get_prompt(self, question, evidence, evidence_mode: int): method run (line 143) | def run( method invoke (line 148) | def invoke( method ainvoke (line 158) | async def ainvoke( # type: ignore method stream (line 190) | def stream( # type: ignore method match_evidence_with_context (line 296) | def match_evidence_with_context(self, answer, docs) -> dict[str, list[... method prepare_citations (line 322) | def prepare_citations(self, answer, docs) -> tuple[list[Document], lis... FILE: libs/kotaemon/kotaemon/indices/qa/citation_qa_inline.py class InlineEvidence (line 78) | class InlineEvidence: class AnswerWithInlineCitation (line 86) | class AnswerWithInlineCitation(AnswerWithContextPipeline): method get_prompt (line 91) | def get_prompt(self, question, evidence, evidence_mode: int): method answer_to_citations (line 103) | def answer_to_citations(self, answer) -> list[InlineEvidence]: method replace_citation_with_link (line 152) | def replace_citation_with_link(self, answer: str): method stream (line 193) | def stream( # type: ignore method match_evidence_with_context (line 322) | def match_evidence_with_context(self, answer, docs) -> dict[str, list[... FILE: libs/kotaemon/kotaemon/indices/qa/format_context.py class PrepareEvidencePipeline (line 15) | class PrepareEvidencePipeline(BaseComponent): method run (line 28) | def run(self, docs: list[RetrievedDocument]) -> Document: FILE: libs/kotaemon/kotaemon/indices/qa/utils.py function find_text (line 4) | def find_text(search_span, context, min_length=5): function find_start_end_phrase (line 44) | def find_start_end_phrase( function replace_think_tag_with_details (line 85) | def replace_think_tag_with_details(text): function strip_think_tag (line 94) | def strip_think_tag(text): FILE: libs/kotaemon/kotaemon/indices/rankings/base.py class BaseReranking (line 8) | class BaseReranking(BaseComponent): method run (line 10) | def run(self, documents: list[Document], query: str) -> list[Document]: FILE: libs/kotaemon/kotaemon/indices/rankings/cohere.py class CohereReranking (line 10) | class CohereReranking(BaseReranking): method run (line 15) | def run(self, documents: list[Document], query: str) -> list[Document]: FILE: libs/kotaemon/kotaemon/indices/rankings/llm.py class LLMReranking (line 23) | class LLMReranking(BaseReranking): method run (line 29) | def run( FILE: libs/kotaemon/kotaemon/indices/rankings/llm_scoring.py class LLMScoring (line 13) | class LLMScoring(LLMReranking): method run (line 14) | def run( FILE: libs/kotaemon/kotaemon/indices/rankings/llm_trulens.py function validate_rating (line 52) | def validate_rating(rating) -> int: function re_0_10_rating (line 61) | def re_0_10_rating(s: str) -> int: class LLMTrulensScoring (line 96) | class LLMTrulensScoring(LLMReranking): method run (line 113) | def run( FILE: libs/kotaemon/kotaemon/indices/retrievers/jina_web_search.py class WebSearch (line 10) | class WebSearch(BaseComponent): method run (line 15) | def run( method generate_relevant_scores (line 59) | def generate_relevant_scores(self, text, documents: list[RetrievedDocu... FILE: libs/kotaemon/kotaemon/indices/retrievers/tavily_web_search.py class WebSearch (line 8) | class WebSearch(BaseComponent): method run (line 13) | def run( method generate_relevant_scores (line 56) | def generate_relevant_scores(self, text, documents: list[RetrievedDocu... FILE: libs/kotaemon/kotaemon/indices/splitters/__init__.py class BaseSplitter (line 4) | class BaseSplitter(DocTransformer): class TokenSplitter (line 10) | class TokenSplitter(LlamaIndexDocTransformerMixin, BaseSplitter): method __init__ (line 11) | def __init__( method _get_li_class (line 25) | def _get_li_class(self): class SentenceWindowSplitter (line 31) | class SentenceWindowSplitter(LlamaIndexDocTransformerMixin, BaseSplitter): method __init__ (line 32) | def __init__( method _get_li_class (line 46) | def _get_li_class(self): FILE: libs/kotaemon/kotaemon/indices/vectorindex.py class VectorIndexing (line 21) | class VectorIndexing(BaseIndexing): method to_retrieval_pipeline (line 36) | def to_retrieval_pipeline(self, *args, **kwargs): method write_chunk_to_file (line 45) | def write_chunk_to_file(self, docs: list[Document]): method add_to_docstore (line 79) | def add_to_docstore(self, docs: list[Document]): method add_to_vectorstore (line 84) | def add_to_vectorstore(self, docs: list[Document]): method run (line 95) | def run(self, text: str | list[str] | Document | list[Document]): class VectorRetrieval (line 116) | class VectorRetrieval(BaseRetrieval): method _filter_docs (line 127) | def _filter_docs( method run (line 134) | def run( class TextVectorQA (line 306) | class TextVectorQA(BaseComponent): method run (line 310) | def run(self, question, **kwargs): FILE: libs/kotaemon/kotaemon/llms/base.py class BaseLLM (line 8) | class BaseLLM(BaseComponent): method to_langchain_format (line 9) | def to_langchain_format(self) -> BaseLanguageModel: method invoke (line 12) | def invoke(self, *args, **kwargs) -> LLMInterface: method ainvoke (line 15) | async def ainvoke(self, *args, **kwargs) -> LLMInterface: method stream (line 18) | def stream(self, *args, **kwargs) -> Iterator[LLMInterface]: method astream (line 21) | def astream(self, *args, **kwargs) -> AsyncGenerator[LLMInterface, None]: method run (line 24) | def run(self, *args, **kwargs): FILE: libs/kotaemon/kotaemon/llms/branching.py class SimpleBranchingPipeline (line 8) | class SimpleBranchingPipeline(BaseComponent): method add_branch (line 54) | def add_branch(self, component: BaseComponent): method run (line 63) | def run(self, **prompt_kwargs): class GatedBranchingPipeline (line 81) | class GatedBranchingPipeline(SimpleBranchingPipeline): method run (line 128) | def run(self, *, condition_text: Optional[str] = None, **prompt_kwargs): function identity (line 163) | def identity(x): FILE: libs/kotaemon/kotaemon/llms/chats/base.py class ChatLLM (line 11) | class ChatLLM(BaseLLM): method flow (line 12) | def flow(self): FILE: libs/kotaemon/kotaemon/llms/chats/endpoint_based.py class EndpointChatLLM (line 15) | class EndpointChatLLM(ChatLLM): method run (line 28) | def run( method invoke (line 79) | def invoke( method ainvoke (line 85) | async def ainvoke( FILE: libs/kotaemon/kotaemon/llms/chats/langchain_based.py class LCChatMixin (line 13) | class LCChatMixin: method _get_lc_class (line 16) | def _get_lc_class(self): method _get_tool_call_kwargs (line 21) | def _get_tool_call_kwargs(self): method __init__ (line 24) | def __init__(self, stream: bool = False, **params): method run (line 32) | def run( method prepare_message (line 39) | def prepare_message(self, messages: str | BaseMessage | list[BaseMessa... method prepare_response (line 51) | def prepare_response(self, pred): method invoke (line 74) | def invoke( method ainvoke (line 112) | async def ainvoke( method stream (line 119) | def stream( method astream (line 125) | async def astream( method to_langchain_format (line 131) | def to_langchain_format(self): method __repr__ (line 134) | def __repr__(self): method __str__ (line 142) | def __str__(self): method __setattr__ (line 152) | def __setattr__(self, name, value): method __getattr__ (line 162) | def __getattr__(self, name): method dump (line 167) | def dump(self, *args, **kwargs): method specs (line 176) | def specs(self, path: str): class LCChatOpenAI (line 191) | class LCChatOpenAI(LCChatMixin, ChatLLM): # type: ignore method __init__ (line 192) | def __init__( method _get_lc_class (line 210) | def _get_lc_class(self): class LCAzureChatOpenAI (line 219) | class LCAzureChatOpenAI(LCChatMixin, ChatLLM): # type: ignore method __init__ (line 220) | def __init__( method _get_lc_class (line 240) | def _get_lc_class(self): class LCAnthropicChat (line 249) | class LCAnthropicChat(LCChatMixin, ChatLLM): # type: ignore method _get_tool_call_kwargs (line 261) | def _get_tool_call_kwargs(self): method __init__ (line 264) | def __init__( method _get_lc_class (line 278) | def _get_lc_class(self): class LCGeminiChat (line 287) | class LCGeminiChat(LCChatMixin, ChatLLM): # type: ignore method _get_tool_call_kwargs (line 299) | def _get_tool_call_kwargs(self): method __init__ (line 308) | def __init__( method _get_lc_class (line 322) | def _get_lc_class(self): class LCCohereChat (line 331) | class LCCohereChat(LCChatMixin, ChatLLM): # type: ignore method __init__ (line 340) | def __init__( method _get_lc_class (line 354) | def _get_lc_class(self): class LCOllamaChat (line 363) | class LCOllamaChat(LCChatMixin, ChatLLM): # type: ignore method __init__ (line 377) | def __init__( method _get_lc_class (line 391) | def _get_lc_class(self): FILE: libs/kotaemon/kotaemon/llms/chats/llamacpp.py class LlamaCppChat (line 12) | class LlamaCppChat(ChatLLM): method client_object (line 54) | def client_object(self) -> "Llama": method prepare_message (line 102) | def prepare_message( method invoke (line 121) | def invoke( method stream (line 142) | def stream( FILE: libs/kotaemon/kotaemon/llms/chats/openai.py class BaseChatOpenAI (line 23) | class BaseChatOpenAI(ChatLLM): method max_retries_ (line 133) | def max_retries_(self): method prepare_message (line 140) | def prepare_message( method prepare_output (line 163) | def prepare_output(self, resp: dict) -> LLMInterface: method prepare_client (line 195) | def prepare_client(self, async_version: bool = False): method openai_response (line 203) | def openai_response(self, client, **kwargs): method aopenai_response (line 207) | async def aopenai_response(self, client, **kwargs): method invoke (line 211) | def invoke( method ainvoke (line 221) | async def ainvoke( method stream (line 234) | def stream( method astream (line 262) | async def astream( class ChatOpenAI (line 278) | class ChatOpenAI(BaseChatOpenAI): method prepare_client (line 285) | def prepare_client(self, async_version: bool = False): method prepare_params (line 307) | def prepare_params(self, **kwargs): method openai_response (line 331) | def openai_response(self, client, **kwargs): method aopenai_response (line 336) | async def aopenai_response(self, client, **kwargs): class StructuredOutputChatOpenAI (line 341) | class StructuredOutputChatOpenAI(ChatOpenAI): method prepare_output (line 348) | def prepare_output(self, resp: dict) -> StructuredOutputLLMInterface: method prepare_params (line 382) | def prepare_params(self, **kwargs): method openai_response (line 410) | def openai_response(self, client, **kwargs): method aopenai_response (line 416) | async def aopenai_response(self, client, **kwargs): class AzureChatOpenAI (line 423) | class AzureChatOpenAI(BaseChatOpenAI): method azure_ad_token_provider_ (line 440) | def azure_ad_token_provider_(self): method prepare_client (line 444) | def prepare_client(self, async_version: bool = False): method prepare_params (line 468) | def prepare_params(self, **kwargs): method openai_response (line 492) | def openai_response(self, client, **kwargs): method aopenai_response (line 497) | async def aopenai_response(self, client, **kwargs): FILE: libs/kotaemon/kotaemon/llms/completions/base.py class LLM (line 4) | class LLM(BaseLLM): FILE: libs/kotaemon/kotaemon/llms/completions/langchain_based.py class LCCompletionMixin (line 11) | class LCCompletionMixin: method _get_lc_class (line 12) | def _get_lc_class(self): method __init__ (line 17) | def __init__(self, **params): method run (line 24) | def run(self, text: str) -> LLMInterface: method to_langchain_format (line 48) | def to_langchain_format(self): method __repr__ (line 51) | def __repr__(self): method __str__ (line 59) | def __str__(self): method __setattr__ (line 69) | def __setattr__(self, name, value): method __getattr__ (line 79) | def __getattr__(self, name): method dump (line 84) | def dump(self, *args, **kwargs): method specs (line 93) | def specs(self, path: str): class OpenAI (line 108) | class OpenAI(LCCompletionMixin, LLM): method __init__ (line 111) | def __init__( method _get_lc_class (line 143) | def _get_lc_class(self): class AzureOpenAI (line 152) | class AzureOpenAI(LCCompletionMixin, LLM): method __init__ (line 155) | def __init__( method _get_lc_class (line 191) | def _get_lc_class(self): class LlamaCpp (line 200) | class LlamaCpp(LCCompletionMixin, LLM): method __init__ (line 203) | def __init__( method _get_lc_class (line 221) | def _get_lc_class(self): FILE: libs/kotaemon/kotaemon/llms/cot.py class Thought (line 13) | class Thought(BaseComponent): method prompt_template (line 86) | def prompt_template(self): method run (line 90) | def run(self, **kwargs) -> Document: method get_variables (line 98) | def get_variables(self) -> List[str]: method __add__ (line 101) | def __add__(self, next_thought: "Thought") -> "ManualSequentialChainOf... class ManualSequentialChainOfThought (line 107) | class ManualSequentialChainOfThought(BaseComponent): method run (line 156) | def run(self, **kwargs) -> Document: method __add__ (line 172) | def __add__(self, next_thought: Thought) -> "ManualSequentialChainOfTh... FILE: libs/kotaemon/kotaemon/llms/linear.py class SimpleLinearPipeline (line 10) | class SimpleLinearPipeline(BaseComponent): method run (line 52) | def run( class GatedLinearPipeline (line 81) | class GatedLinearPipeline(SimpleLinearPipeline): method run (line 120) | def run( FILE: libs/kotaemon/kotaemon/llms/prompts/base.py class BasePromptComponent (line 10) | class BasePromptComponent(BaseComponent): class Config (line 20) | class Config: method template__ (line 27) | def template__(self): method __init__ (line 34) | def __init__(self, **kwargs): method __check_redundant_kwargs (line 38) | def __check_redundant_kwargs(self, **kwargs): method __check_unset_placeholders (line 53) | def __check_unset_placeholders(self): method __validate_value_type (line 69) | def __validate_value_type(self, **kwargs): method __set (line 96) | def __set(self, **kwargs): method __prepare_value (line 113) | def __prepare_value(self): method set_value (line 152) | def set_value(self, **kwargs): method run (line 168) | def run(self, **kwargs): method flow (line 186) | def flow(self): FILE: libs/kotaemon/kotaemon/llms/prompts/template.py class PromptTemplate (line 5) | class PromptTemplate: method __init__ (line 10) | def __init__(self, template: str, ignore_invalid=True): method check_missing_kwargs (line 34) | def check_missing_kwargs(self, **kwargs): method check_redundant_kwargs (line 52) | def check_redundant_kwargs(self, **kwargs): method populate (line 75) | def populate(self, safe=True, **kwargs) -> str: method partial_populate (line 94) | def partial_populate(self, **kwargs): method __add__ (line 130) | def __add__(self, other): FILE: libs/kotaemon/kotaemon/loaders/adobe_loader.py class AdobeReader (line 24) | class AdobeReader(BaseReader): method __init__ (line 42) | def __init__( method load_data (line 56) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/azureai_document_intelligence_loader.py function crop_image (line 15) | def crop_image(file_path: Path, bbox: list[float], page_number: int = 0)... class AzureAIDocumentIntelligenceLoader (line 59) | class AzureAIDocumentIntelligenceLoader(BaseReader): method client_ (line 111) | def client_(self): method run (line 122) | def run( method load_data (line 127) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/base.py class BaseReader (line 10) | class BaseReader(BaseComponent): class AutoReader (line 16) | class AutoReader(BaseReader): method __init__ (line 19) | def __init__(self, reader_type: Union[str, Type["LIBaseReader"]]) -> N... method load_data (line 44) | def load_data(self, file: Union[Path, str], **kwargs: Any) -> List[Doc... method run (line 51) | def run(self, file: Union[Path, str], **kwargs: Any) -> List[Document]: class LIReaderMixin (line 55) | class LIReaderMixin(BaseComponent): method _get_wrapped_class (line 72) | def _get_wrapped_class(self) -> Type["LIBaseReader"]: method __init__ (line 77) | def __init__(self, *args, **kwargs): method __setattr__ (line 82) | def __setattr__(self, name: str, value: Any) -> None: method __getattr__ (line 88) | def __getattr__(self, name: str) -> Any: method load_data (line 91) | def load_data(self, *args, **kwargs: Any) -> List[Document]: method run (line 98) | def run(self, *args, **kwargs: Any) -> List[Document]: FILE: libs/kotaemon/kotaemon/loaders/composite_loader.py class DirectoryReader (line 8) | class DirectoryReader(LIReaderMixin, BaseReader): method _get_wrapped_class (line 50) | def _get_wrapped_class(self) -> Type["LIBaseReader"]: FILE: libs/kotaemon/kotaemon/loaders/docling_loader.py class DoclingReader (line 14) | class DoclingReader(BaseReader): method converter_ (line 45) | def converter_(self): method run (line 53) | def run( method load_data (line 58) | def load_data( method _convert_bbox_bl_tl (line 211) | def _convert_bbox_bl_tl( method _parse_table (line 223) | def _parse_table(self, table_obj: dict) -> str: FILE: libs/kotaemon/kotaemon/loaders/docx_loader.py class DocxReader (line 11) | class DocxReader(BaseReader): method __init__ (line 21) | def __init__(self, *args, **kwargs): method _load_single_table (line 30) | def _load_single_table(self, table) -> List[List[str]]: method load_data (line 45) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/excel_loader.py class PandasExcelReader (line 14) | class PandasExcelReader(BaseReader): method __init__ (line 29) | def __init__( method load_data (line 43) | def load_data( class ExcelReader (line 107) | class ExcelReader(BaseReader): method __init__ (line 122) | def __init__( method load_data (line 136) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/html_loader.py class HtmlReader (line 11) | class HtmlReader(BaseReader): method __init__ (line 24) | def __init__(self, page_break_pattern: Optional[str] = None, *args, **... method load_data (line 36) | def load_data( class MhtmlReader (line 77) | class MhtmlReader(BaseReader): method __init__ (line 80) | def __init__( method load_data (line 115) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/mathpix_loader.py class MathpixPDFReader (line 18) | class MathpixPDFReader(BaseReader): method __init__ (line 21) | def __init__( method _mathpix_headers (line 49) | def _mathpix_headers(self) -> Dict[str, str]: method url (line 53) | def url(self) -> str: method data (line 57) | def data(self) -> dict: method send_pdf (line 64) | def send_pdf(self, file_path) -> str: method wait_for_processing (line 77) | def wait_for_processing(self, pdf_id: str) -> None: method get_processed_pdf (line 113) | def get_processed_pdf(self, pdf_id: str) -> str: method clean_pdf (line 123) | def clean_pdf(self, contents: str) -> str: method parse_markdown_text_to_tables (line 158) | def parse_markdown_text_to_tables( method load_data (line 202) | def load_data( method lazy_load_data (line 271) | def lazy_load_data( FILE: libs/kotaemon/kotaemon/loaders/ocr_loader.py function tenacious_api_post (line 26) | def tenacious_api_post(url, file_path, table_only, **kwargs): class OCRReader (line 35) | class OCRReader(BaseReader): method __init__ (line 54) | def __init__(self, endpoint: Optional[str] = None, use_ocr=True): method load_data (line 62) | def load_data( class ImageReader (line 131) | class ImageReader(BaseReader): method __init__ (line 150) | def __init__(self, endpoint: Optional[str] = None): method load_data (line 157) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/pdf_loader.py function get_page_thumbnails (line 16) | def get_page_thumbnails( function convert_image_to_base64 (line 49) | def convert_image_to_base64(img: Image.Image) -> str: class PDFThumbnailReader (line 59) | class PDFThumbnailReader(PDFReader): method __init__ (line 62) | def __init__(self) -> None: method load_data (line 68) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/txt_loader.py class TxtReader (line 9) | class TxtReader(BaseReader): method run (line 10) | def run( method load_data (line 15) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/unstructured_loader.py class UnstructuredReader (line 20) | class UnstructuredReader(BaseReader): method __init__ (line 23) | def __init__(self, *args: Any, **kwargs: Any) -> None: method load_data (line 51) | def load_data( FILE: libs/kotaemon/kotaemon/loaders/utils/adobe.py function request_adobe_service (line 19) | def request_adobe_service(file_path: str, output_path: str = "") -> str: function make_markdown_table (line 113) | def make_markdown_table(table_as_list: List[List[str]]) -> str: function load_json (line 148) | def load_json(input_path: Union[str | Path]) -> dict: function load_excel (line 156) | def load_excel(input_path: Union[str | Path]) -> str: function encode_image_base64 (line 175) | def encode_image_base64(image_path: Union[str | Path]) -> Union[bytes, s... function parse_table_paths (line 182) | def parse_table_paths(file_paths: List[Path]) -> str: function parse_figure_paths (line 193) | def parse_figure_paths(file_paths: List[Path]) -> Union[bytes, str]: function generate_single_figure_caption (line 205) | def generate_single_figure_caption(vlm_endpoint: str, figure: str) -> str: function generate_figure_captions (line 224) | def generate_figure_captions( FILE: libs/kotaemon/kotaemon/loaders/utils/box.py function bbox_to_points (line 4) | def bbox_to_points(box: List[int]): function points_to_bbox (line 10) | def points_to_bbox(points: List[Tuple[int, int]]): function scale_points (line 17) | def scale_points(points: List[Tuple[int, int]], scale_factor: float = 1.0): function union_points (line 22) | def union_points(points: List[Tuple[int, int]]): function scale_box (line 30) | def scale_box(box: List[int], scale_factor: float = 1.0): function box_h (line 35) | def box_h(box: List[int]): function box_w (line 40) | def box_w(box: List[int]): function box_area (line 45) | def box_area(box: List[int]): function get_rect_iou (line 51) | def get_rect_iou(gt_box: List[tuple], pd_box: List[tuple], iou_type=0) -... function sort_funsd_reading_order (line 106) | def sort_funsd_reading_order(lines: List[dict], box_key_name: str = "box"): FILE: libs/kotaemon/kotaemon/loaders/utils/gpt4v.py function generate_gpt4v (line 11) | def generate_gpt4v( function stream_gpt4v (line 61) | def stream_gpt4v( FILE: libs/kotaemon/kotaemon/loaders/utils/pdf_ocr.py function read_pdf_unstructured (line 23) | def read_pdf_unstructured(input_path: Union[Path, str]): function merge_ocr_and_pdf_texts (line 60) | def merge_ocr_and_pdf_texts( function merge_table_cell_and_ocr (line 115) | def merge_table_cell_and_ocr( function parse_ocr_output (line 227) | def parse_ocr_output( FILE: libs/kotaemon/kotaemon/loaders/utils/table.py function check_col_conflicts (line 8) | def check_col_conflicts( function merge_cols (line 30) | def merge_cols(col_a: List[str], col_b: List[str]) -> List[str]: function add_index_col (line 45) | def add_index_col(csv_rows: List[List[str]]) -> List[List[str]]: function compress_csv (line 59) | def compress_csv(csv_rows: List[List[str]]) -> List[List[str]]: function get_table_from_ocr (line 82) | def get_table_from_ocr(ocr_list: List[dict], table_list: List[dict]): function make_markdown_table (line 106) | def make_markdown_table(array: List[List[str]]) -> str: function parse_csv_string_to_list (line 143) | def parse_csv_string_to_list(csv_str: str) -> List[List[str]]: function format_cell (line 158) | def format_cell(cell: str, length_limit: Optional[int] = None) -> str: function extract_tables_from_csv_string (line 174) | def extract_tables_from_csv_string( function strip_special_chars_markdown (line 217) | def strip_special_chars_markdown(text: str) -> str: function parse_markdown_text_to_tables (line 222) | def parse_markdown_text_to_tables(text: str) -> Tuple[List[str], List[st... function table_cells_to_markdown (line 258) | def table_cells_to_markdown(cells: List[dict]): FILE: libs/kotaemon/kotaemon/loaders/web_loader.py class WebReader (line 15) | class WebReader(BaseReader): method run (line 16) | def run( method fetch_url (line 21) | def fetch_url(self, url: str): method load_data (line 36) | def load_data( FILE: libs/kotaemon/kotaemon/parsers/regex_extractor.py class RegexExtractor (line 9) | class RegexExtractor(BaseComponent): class Config (line 19) | class Config: method __init__ (line 27) | def __init__(self, pattern: str | list[str], **kwargs): method run_raw_static (line 33) | def run_raw_static(pattern: str, text: str) -> list[str]: method map_output (line 48) | def map_output(text, output_map) -> str: method run_raw (line 69) | def run_raw(self, text: str) -> ExtractorOutput: method run (line 91) | def run( class FirstMatchRegexExtractor (line 134) | class FirstMatchRegexExtractor(RegexExtractor): method run_raw (line 137) | def run_raw(self, text: str) -> ExtractorOutput: FILE: libs/kotaemon/kotaemon/rerankings/base.py class BaseReranking (line 8) | class BaseReranking(BaseComponent): method run (line 10) | def run(self, documents: list[Document], query: str) -> list[Document]: FILE: libs/kotaemon/kotaemon/rerankings/cohere.py class CohereReranking (line 12) | class CohereReranking(BaseReranking): method run (line 34) | def run(self, documents: list[Document], query: str) -> list[Document]: FILE: libs/kotaemon/kotaemon/rerankings/tei_fast_rerank.py class TeiFastReranking (line 14) | class TeiFastReranking(BaseReranking): method client (line 40) | def client(self, query, texts): method run (line 55) | def run(self, documents: list[Document], query: str) -> list[Document]: FILE: libs/kotaemon/kotaemon/rerankings/voyageai.py function _import_voyageai (line 14) | def _import_voyageai(): class VoyageAIReranking (line 21) | class VoyageAIReranking(BaseReranking): method __init__ (line 38) | def __init__(self, *args, **kwargs): method run (line 46) | def run(self, documents: list[Document], query: str) -> list[Document]: FILE: libs/kotaemon/kotaemon/storages/docstores/base.py class BaseDocumentStore (line 7) | class BaseDocumentStore(ABC): method __init__ (line 11) | def __init__(self, *args, **kwargs): method add (line 15) | def add( method get (line 30) | def get(self, ids: Union[List[str], str]) -> List[Document]: method get_all (line 35) | def get_all(self) -> List[Document]: method count (line 40) | def count(self) -> int: method query (line 45) | def query( method delete (line 52) | def delete(self, ids: Union[List[str], str]): method drop (line 57) | def drop(self): FILE: libs/kotaemon/kotaemon/storages/docstores/elasticsearch.py class ElasticsearchDocumentStore (line 10) | class ElasticsearchDocumentStore(BaseDocumentStore): method __init__ (line 13) | def __init__( method add (line 63) | def add( method query_raw (line 103) | def query_raw(self, query: dict) -> List[Document]: method query (line 124) | def query( method get (line 143) | def get(self, ids: Union[List[str], str]) -> List[Document]: method count (line 150) | def count(self) -> int: method get_all (line 157) | def get_all(self) -> List[Document]: method delete (line 162) | def delete(self, ids: Union[List[str], str]): method drop (line 171) | def drop(self): method __persist_flow__ (line 176) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/docstores/in_memory.py class InMemoryDocumentStore (line 10) | class InMemoryDocumentStore(BaseDocumentStore): method __init__ (line 13) | def __init__(self): method add (line 16) | def add( method get (line 44) | def get(self, ids: Union[List[str], str]) -> List[Document]: method get_all (line 51) | def get_all(self) -> List[Document]: method count (line 55) | def count(self) -> int: method delete (line 59) | def delete(self, ids: Union[List[str], str]): method save (line 67) | def save(self, path: Union[str, Path]): method load (line 73) | def load(self, path: Union[str, Path]): method query (line 84) | def query( method __persist_flow__ (line 90) | def __persist_flow__(self): method drop (line 93) | def drop(self): FILE: libs/kotaemon/kotaemon/storages/docstores/lancedb.py class LanceDBDocumentStore (line 11) | class LanceDBDocumentStore(BaseDocumentStore): method __init__ (line 14) | def __init__(self, path: str = "lancedb", collection_name: str = "docs... method add (line 26) | def add( method query (line 62) | def query( method get (line 96) | def get(self, ids: Union[List[str], str]) -> List[Document]: method delete (line 129) | def delete(self, ids: Union[List[str], str], refresh_indices: bool = T... method drop (line 146) | def drop(self): method count (line 150) | def count(self) -> int: method get_all (line 153) | def get_all(self) -> List[Document]: method __persist_flow__ (line 156) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/docstores/simple_file.py class SimpleFileDocumentStore (line 9) | class SimpleFileDocumentStore(InMemoryDocumentStore): method __init__ (line 12) | def __init__(self, path: str | Path, collection_name: str = "default"): method get (line 22) | def get(self, ids: Union[List[str], str]) -> List[Document]: method add (line 34) | def add( method delete (line 52) | def delete(self, ids: Union[List[str], str]): method drop (line 57) | def drop(self): method __persist_flow__ (line 62) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/vectorstores/base.py class BaseVectorStore (line 14) | class BaseVectorStore(ABC): method __init__ (line 16) | def __init__(self, *args, **kwargs): method add (line 20) | def add( method delete (line 40) | def delete(self, ids: list[str], **kwargs): method query (line 50) | def query( method drop (line 70) | def drop(self): class LlamaIndexVectorStore (line 75) | class LlamaIndexVectorStore(BaseVectorStore): method _get_li_class (line 80) | def _get_li_class(self): method __init__ (line 85) | def __init__(self, *args, **kwargs): method __setattr__ (line 101) | def __setattr__(self, name: str, value: Any) -> None: method __getattr__ (line 107) | def __getattr__(self, name: str) -> Any: method add (line 113) | def add( method delete (line 137) | def delete(self, ids: list[str], **kwargs): method query (line 141) | def query( FILE: libs/kotaemon/kotaemon/storages/vectorstores/chroma.py class ChromaVectorStore (line 8) | class ChromaVectorStore(LlamaIndexVectorStore): method __init__ (line 11) | def __init__( method delete (line 60) | def delete(self, ids: List[str], **kwargs): method drop (line 69) | def drop(self): method count (line 73) | def count(self) -> int: method __persist_flow__ (line 76) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/vectorstores/in_memory.py class InMemoryVectorStore (line 11) | class InMemoryVectorStore(LlamaIndexVectorStore): method __init__ (line 15) | def __init__( method save (line 31) | def save( method load (line 46) | def load(self, load_path: str, fs: Optional[fsspec.AbstractFileSystem]... method drop (line 56) | def drop(self): method __persist_flow__ (line 60) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/vectorstores/lancedb.py function custom_to_lance_filter (line 13) | def custom_to_lance_filter( class LanceDBVectorStore (line 30) | class LanceDBVectorStore(LlamaIndexVectorStore): method __init__ (line 33) | def __init__( method delete (line 67) | def delete(self, ids: List[str], **kwargs): method drop (line 76) | def drop(self): method count (line 80) | def count(self) -> int: method __persist_flow__ (line 83) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/vectorstores/milvus.py class MilvusVectorStore (line 9) | class MilvusVectorStore(LlamaIndexVectorStore): method _get_li_class (line 12) | def _get_li_class(self): method __init__ (line 25) | def __init__( method _lazy_init (line 39) | def _lazy_init(self, dim: Optional[int] = None): method add (line 67) | def add( method query (line 82) | def query( method delete (line 93) | def delete(self, ids: list[str], **kwargs): method drop (line 97) | def drop(self): method count (line 100) | def count(self) -> int: method __persist_flow__ (line 109) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/vectorstores/qdrant.py class QdrantVectorStore (line 6) | class QdrantVectorStore(LlamaIndexVectorStore): method _get_li_class (line 9) | def _get_li_class(self): method __init__ (line 22) | def __init__( method delete (line 49) | def delete(self, ids: List[str], **kwargs): method drop (line 66) | def drop(self): method count (line 70) | def count(self) -> int: method __persist_flow__ (line 75) | def __persist_flow__(self): FILE: libs/kotaemon/kotaemon/storages/vectorstores/simple_file.py class SimpleFileVectorStore (line 14) | class SimpleFileVectorStore(LlamaIndexVectorStore): method __init__ (line 20) | def __init__( method add (line 46) | def add( method delete (line 56) | def delete(self, ids: list[str], **kwargs): method drop (line 61) | def drop(self): method __persist_flow__ (line 65) | def __persist_flow__(self): FILE: libs/kotaemon/tests/_test_multimodal_reader.py function test_adobe_reader (line 14) | def test_adobe_reader(): FILE: libs/kotaemon/tests/conftest.py function mock_google_search (line 5) | def mock_google_search(monkeypatch): function if_haystack_not_installed (line 18) | def if_haystack_not_installed(): function if_sentence_bert_not_installed (line 27) | def if_sentence_bert_not_installed(): function if_sentence_fastembed_not_installed (line 36) | def if_sentence_fastembed_not_installed(): function if_unstructured_pdf_not_installed (line 45) | def if_unstructured_pdf_not_installed(): function if_cohere_not_installed (line 55) | def if_cohere_not_installed(): function if_llama_cpp_not_installed (line 64) | def if_llama_cpp_not_installed(): function if_voyageai_not_installed (line 73) | def if_voyageai_not_installed(): FILE: libs/kotaemon/tests/simple_pipeline.py class Pipeline (line 11) | class Pipeline(BaseComponent): method run (line 31) | def run(self, text: str) -> LLMInterface: FILE: libs/kotaemon/tests/test_agent.py function generate_chat_completion_obj (line 34) | def generate_chat_completion_obj(text): function llm (line 116) | def llm(): function test_agent_fail (line 129) | def test_agent_fail(openai_completion, llm, mock_google_search): function test_rewoo_agent (line 148) | def test_rewoo_agent(openai_completion, llm, mock_google_search): function test_react_agent (line 166) | def test_react_agent(openai_completion, llm, mock_google_search): function test_react_agent_langchain (line 184) | def test_react_agent_langchain(openai_completion, llm, mock_google_search): function test_wrapper_agent_langchain (line 209) | def test_wrapper_agent_langchain(openai_completion, llm, mock_google_sea... function test_react_agent_with_langchain_tools (line 229) | def test_react_agent_with_langchain_tools(openai_completion, llm): FILE: libs/kotaemon/tests/test_composite.py function mock_llm (line 42) | def mock_llm(): function mock_post_processor (line 52) | def mock_post_processor(): function mock_prompt (line 57) | def mock_prompt(): function mock_simple_linear_pipeline (line 62) | def mock_simple_linear_pipeline(mock_prompt, mock_llm, mock_post_process... function mock_gated_linear_pipeline_positive (line 69) | def mock_gated_linear_pipeline_positive(mock_prompt, mock_llm, mock_post... function mock_gated_linear_pipeline_negative (line 79) | def mock_gated_linear_pipeline_negative(mock_prompt, mock_llm, mock_post... function test_simple_linear_pipeline_run (line 88) | def test_simple_linear_pipeline_run(mocker, mock_simple_linear_pipeline): function test_gated_linear_pipeline_run_positive (line 100) | def test_gated_linear_pipeline_run_positive( function test_gated_linear_pipeline_run_negative (line 116) | def test_gated_linear_pipeline_run_negative( function test_simple_branching_pipeline_run (line 132) | def test_simple_branching_pipeline_run(mocker, mock_simple_linear_pipeli... function test_simple_gated_branching_pipeline_run (line 154) | def test_simple_gated_branching_pipeline_run( FILE: libs/kotaemon/tests/test_cot.py function test_cot_plus_operator (line 40) | def test_cot_plus_operator(openai_completion): function test_cot_manual (line 71) | def test_cot_manual(openai_completion): function test_cot_with_termination_callback (line 100) | def test_cot_with_termination_callback(openai_completion): FILE: libs/kotaemon/tests/test_docstores.py function test_inmemory_document_store_base_interfaces (line 215) | def test_inmemory_document_store_base_interfaces(tmp_path): function test_simplefile_document_store_base_interfaces (line 271) | def test_simplefile_document_store_base_interfaces(tmp_path): function test_elastic_document_store (line 329) | def test_elastic_document_store(elastic_api): FILE: libs/kotaemon/tests/test_documents.py function test_document_constructor_with_builtin_types (line 6) | def test_document_constructor_with_builtin_types(): function test_document_constructor_with_document (line 14) | def test_document_constructor_with_document(): function test_document_to_haystack_format (line 23) | def test_document_to_haystack_format(): function test_retrieved_document_default_values (line 35) | def test_retrieved_document_default_values(): function test_retrieved_document_attributes (line 43) | def test_retrieved_document_attributes(): FILE: libs/kotaemon/tests/test_embedding_models.py function assert_embedding_result (line 31) | def assert_embedding_result(output): function test_azureopenai_embeddings_raw (line 42) | def test_azureopenai_embeddings_raw(openai_embedding_call): function test_lcazureopenai_embeddings_batch_raw (line 58) | def test_lcazureopenai_embeddings_batch_raw(openai_embedding_call): function test_azureopenai_embeddings_batch_raw (line 74) | def test_azureopenai_embeddings_batch_raw(openai_embedding_call): function test_openai_embeddings_raw (line 90) | def test_openai_embeddings_raw(openai_embedding_call): function test_openai_embeddings_batch_raw (line 104) | def test_openai_embeddings_batch_raw(openai_embedding_call): function test_lchuggingface_embeddings (line 123) | def test_lchuggingface_embeddings( function test_lccohere_embeddings (line 143) | def test_lccohere_embeddings(langchain_cohere_embedding_call): function test_fastembed_embeddings (line 156) | def test_fastembed_embeddings(): function test_voyageai_embeddings (line 169) | def test_voyageai_embeddings(sync_call, async_call): FILE: libs/kotaemon/tests/test_indexing_retrieval.py function test_indexing (line 21) | def test_indexing(tmp_path): function test_retrieving (line 45) | def test_retrieving(tmp_path): FILE: libs/kotaemon/tests/test_ingestor.py function test_ingestor_include_src (line 7) | def test_ingestor_include_src(): FILE: libs/kotaemon/tests/test_llms_chat_models.py function test_azureopenai_model (line 47) | def test_azureopenai_model(openai_completion): function test_llamacpp_chat (line 77) | def test_llamacpp_chat(): FILE: libs/kotaemon/tests/test_llms_completion_models.py function test_azureopenai_model (line 43) | def test_azureopenai_model(openai_completion): function test_openai_model (line 66) | def test_openai_model(openai_completion): function test_llamacpp_model (line 86) | def test_llamacpp_model(): FILE: libs/kotaemon/tests/test_mcp_manager.py class _Base (line 16) | class _Base(DeclarativeBase): class _MCPTable (line 20) | class _MCPTable(_Base): function manager (line 32) | def manager(): class MCPManagerForTest (line 44) | class MCPManagerForTest: method __init__ (line 47) | def __init__(self, engine): method load (line 52) | def load(self): method info (line 61) | def info(self) -> dict: method get (line 64) | def get(self, name: str) -> dict | None: method add (line 67) | def add(self, name: str, config: dict): method update (line 76) | def update(self, name: str, config: dict): method delete (line 87) | def delete(self, name: str): method get_enabled_tools (line 95) | def get_enabled_tools(self) -> list[str]: class TestMCPManagerAdd (line 108) | class TestMCPManagerAdd: method test_add_and_retrieve (line 109) | def test_add_and_retrieve(self, manager): method test_add_multiple (line 115) | def test_add_multiple(self, manager): method test_empty_or_whitespace_name_raises (line 121) | def test_empty_or_whitespace_name_raises(self, manager, name): method test_whitespace_name_is_stripped (line 125) | def test_whitespace_name_is_stripped(self, manager): method test_complex_config_stored_correctly (line 129) | def test_complex_config_stored_correctly(self, manager): class TestMCPManagerUpdateDelete (line 141) | class TestMCPManagerUpdateDelete: method test_update_changes_config (line 142) | def test_update_changes_config(self, manager): method test_update_nonexistent_raises (line 149) | def test_update_nonexistent_raises(self, manager): method test_delete_removes_entry (line 153) | def test_delete_removes_entry(self, manager): method test_delete_nonexistent_is_noop (line 160) | def test_delete_nonexistent_is_noop(self, manager): class TestMCPManagerGetEnabledTools (line 165) | class TestMCPManagerGetEnabledTools: method test_only_servers_with_enabled_tools_listed (line 166) | def test_only_servers_with_enabled_tools_listed(self, manager): method test_empty_when_no_servers (line 173) | def test_empty_when_no_servers(self, manager): class TestMCPManagerLoad (line 177) | class TestMCPManagerLoad: method test_load_picks_up_external_db_changes (line 178) | def test_load_picks_up_external_db_changes(self, manager): FILE: libs/kotaemon/tests/test_mcp_tools.py function test_json_schema_type_to_python (line 39) | def test_json_schema_type_to_python(json_type, expected): class TestBuildArgsModel (line 48) | class TestBuildArgsModel: method test_model_fields_and_name (line 49) | def test_model_fields_and_name(self): method test_optional_field_preserves_default (line 63) | def test_optional_field_preserves_default(self): method test_empty_schema_produces_no_fields (line 76) | def test_empty_schema_produces_no_fields(self): class TestParseMcpConfig (line 85) | class TestParseMcpConfig: method test_full_stdio_config (line 86) | def test_full_stdio_config(self): method test_defaults_for_empty_config (line 101) | def test_defaults_for_empty_config(self): method test_auto_split_multi_word_command (line 108) | def test_auto_split_multi_word_command(self): method test_no_split_when_args_already_provided (line 116) | def test_no_split_when_args_already_provided(self): method test_sse_transport_uses_url_as_command (line 127) | def test_sse_transport_uses_url_as_command(self): class TestMakeTool (line 145) | class TestMakeTool: method test_creates_mcp_tool_with_schema (line 146) | def test_creates_mcp_tool_with_schema(self): method test_missing_schema_and_description_uses_defaults (line 172) | def test_missing_schema_and_description_uses_defaults(self): class TestFormatToolList (line 186) | class TestFormatToolList: method test_all_tools_enabled_by_default (line 187) | def test_all_tools_enabled_by_default(self): method test_partial_filter_shows_counts_and_icons (line 197) | def test_partial_filter_shows_counts_and_icons(self): method test_long_description_is_truncated (line 207) | def test_long_description_is_truncated(self): method test_none_description_shows_placeholder (line 211) | def test_none_description_shows_placeholder(self): class TestCreateToolsFromConfig (line 221) | class TestCreateToolsFromConfig: method _make_mock_tools (line 222) | def _make_mock_tools(self): method test_no_filter_returns_all (line 241) | def test_no_filter_returns_all(self, mock_run_async): method test_enabled_tools_filter (line 247) | def test_enabled_tools_filter(self, mock_run_async): class TestMCPToolFormatResult (line 265) | class TestMCPToolFormatResult: method _make_tool (line 266) | def _make_tool(self): method test_text_content_joined (line 275) | def test_text_content_joined(self): method test_error_flag (line 284) | def test_error_flag(self): method test_binary_content (line 293) | def test_binary_content(self): FILE: libs/kotaemon/tests/test_post_processing.py function regex_extractor (line 8) | def regex_extractor(): function test_run_document (line 14) | def test_run_document(regex_extractor): function test_run_raw (line 21) | def test_run_raw(regex_extractor): function test_run_batch_raw (line 27) | def test_run_batch_raw(regex_extractor): FILE: libs/kotaemon/tests/test_prompt.py function test_set_attributes (line 8) | def test_set_attributes(): function test_check_redundant_kwargs (line 23) | def test_check_redundant_kwargs(): function test_check_unset_placeholders (line 30) | def test_check_unset_placeholders(): function test_validate_value_type (line 37) | def test_validate_value_type(): function test_run (line 44) | def test_run(): function test_set_method (line 59) | def test_set_method(): FILE: libs/kotaemon/tests/test_promptui.py class TestPromptConfig (line 8) | class TestPromptConfig: method test_export_prompt_config (line 9) | def test_export_prompt_config(self): class TestPromptUI (line 27) | class TestPromptUI: method test_uigeneration (line 28) | def test_uigeneration(self): class TestExport (line 36) | class TestExport: method test_export (line 37) | def test_export(self, tmp_path): FILE: libs/kotaemon/tests/test_reader.py function test_docx_reader (line 20) | def test_docx_reader(): function test_html_reader (line 27) | def test_html_reader(): function test_pdf_reader (line 36) | def test_pdf_reader(): function test_unstructured_pdf_reader (line 58) | def test_unstructured_pdf_reader(): function test_mhtml_reader (line 77) | def test_mhtml_reader(): function test_azureai_document_intelligence_reader (line 87) | def test_azureai_document_intelligence_reader(mock_client): FILE: libs/kotaemon/tests/test_reranking.py function llm (line 43) | def llm(): function test_reranking (line 56) | def test_reranking(openai_completion, llm): FILE: libs/kotaemon/tests/test_splitter.py function test_split_token (line 42) | def test_split_token(): FILE: libs/kotaemon/tests/test_table_reader.py function fullocr_output (line 15) | def fullocr_output(): function mathpix_output (line 25) | def mathpix_output(): function test_ocr_reader (line 32) | def test_ocr_reader(fullocr_output): function test_mathpix_reader (line 39) | def test_mathpix_reader(mathpix_output): function test_excel_reader (line 46) | def test_excel_reader(): FILE: libs/kotaemon/tests/test_telemetry.py function clean_artifacts_for_telemetry (line 10) | def clean_artifacts_for_telemetry(): function test_disable_telemetry_import_haystack_first (line 32) | def test_disable_telemetry_import_haystack_first(): function test_disable_telemetry_import_haystack_after_kotaemon (line 49) | def test_disable_telemetry_import_haystack_after_kotaemon(): FILE: libs/kotaemon/tests/test_template.py function test_prompt_template_creation (line 6) | def test_prompt_template_creation(): function test_prompt_template_creation_invalid_placeholder (line 18) | def test_prompt_template_creation_invalid_placeholder(): function test_prompt_template_addition (line 32) | def test_prompt_template_addition(): function test_prompt_template_extract_placeholders (line 45) | def test_prompt_template_extract_placeholders(): function test_prompt_template_populate (line 52) | def test_prompt_template_populate(): function test_prompt_template_check_missing_kwargs (line 60) | def test_prompt_template_check_missing_kwargs(): function test_prompt_template_check_redundant_kwargs (line 74) | def test_prompt_template_check_redundant_kwargs(): function test_prompt_template_populate_complex_template (line 91) | def test_prompt_template_populate_complex_template(): function test_prompt_template_partial_populate (line 104) | def test_prompt_template_partial_populate(): FILE: libs/kotaemon/tests/test_tools.py function test_google_tool (line 17) | def test_google_tool(mock_google_search): function test_wikipedia_tool (line 25) | def test_wikipedia_tool(): function test_pipeline_tool (line 37) | def test_pipeline_tool(tmp_path): FILE: libs/kotaemon/tests/test_vectorstore.py class TestChromaVectorStore (line 16) | class TestChromaVectorStore: method test_add (line 17) | def test_add(self, tmp_path): method test_add_from_docs (line 30) | def test_add_from_docs(self, tmp_path): method test_delete (line 44) | def test_delete(self, tmp_path): method test_query (line 58) | def test_query(self, tmp_path): method test_save_load_delete (line 74) | def test_save_load_delete(self, tmp_path): class TestInMemoryVectorStore (line 96) | class TestInMemoryVectorStore: method test_add (line 97) | def test_add(self): method test_save_load_delete (line 108) | def test_save_load_delete(self, tmp_path): class TestSimpleFileVectorStore (line 134) | class TestSimpleFileVectorStore: method test_add_delete (line 135) | def test_add_delete(self, tmp_path): class TestMilvusVectorStore (line 162) | class TestMilvusVectorStore: method test_add (line 163) | def test_add(self, tmp_path): method test_add_from_docs (line 179) | def test_add_from_docs(self, tmp_path): method test_delete (line 196) | def test_delete(self, tmp_path): method test_query (line 213) | def test_query(self, tmp_path): method test_save_load_delete (line 238) | def test_save_load_delete(self, tmp_path): class TestQdrantVectorStore (line 256) | class TestQdrantVectorStore: method test_add (line 257) | def test_add(self): method test_add_from_docs (line 273) | def test_add_from_docs(self, tmp_path): method test_delete (line 289) | def test_delete(self, tmp_path): method test_query (line 314) | def test_query(self, tmp_path): method test_save_load_delete (line 336) | def test_save_load_delete(self, tmp_path): FILE: libs/ktem/ktem/app.py class BaseApp (line 19) | class BaseApp: method __init__ (line 40) | def __init__(self): method initialize_indices (line 84) | def initialize_indices(self): method register_reasonings (line 95) | def register_reasonings(self): method register_extensions (line 109) | def register_extensions(self): method declare_event (line 136) | def declare_event(self, name: str): method subscribe_event (line 146) | def subscribe_event(self, name: str, definition: dict): method get_event (line 157) | def get_event(self, name) -> list[dict]: method ui (line 163) | def ui(self): method on_subscribe_public_events (line 166) | def on_subscribe_public_events(self): method on_register_events (line 169) | def on_register_events(self): method _on_app_created (line 172) | def _on_app_created(self): method make (line 175) | def make(self): method declare_public_events (line 222) | def declare_public_events(self): method subscribe_public_events (line 231) | def subscribe_public_events(self): method register_events (line 238) | def register_events(self): method on_app_created (line 245) | def on_app_created(self): class BasePage (line 253) | class BasePage: method __init__ (line 258) | def __init__(self, app): method on_building_ui (line 261) | def on_building_ui(self): method on_subscribe_public_events (line 264) | def on_subscribe_public_events(self): method on_register_events (line 267) | def on_register_events(self): method _on_app_created (line 270) | def _on_app_created(self): method as_gradio_component (line 273) | def as_gradio_component( method render (line 282) | def render(self): method unrender (line 289) | def unrender(self): method declare_public_events (line 296) | def declare_public_events(self): method subscribe_public_events (line 305) | def subscribe_public_events(self): method register_events (line 312) | def register_events(self): method on_app_created (line 319) | def on_app_created(self): FILE: libs/ktem/ktem/assets/js/main.js function run (line 1) | function run() { FILE: libs/ktem/ktem/assets/js/pdf_viewer.js function onBlockLoad (line 1) | function onBlockLoad() { FILE: libs/ktem/ktem/assets/theme.py class Kotaemon (line 146) | class Kotaemon(Soft): method __init__ (line 152) | def __init__( FILE: libs/ktem/ktem/components.py function get_docstore (line 22) | def get_docstore(collection_name: str = "default") -> BaseDocumentStore: function get_vectorstore (line 31) | def get_vectorstore(collection_name: str = "default") -> BaseVectorStore: class ModelPool (line 39) | class ModelPool: method __init__ (line 42) | def __init__(self, category: str, conf: dict): method __getitem__ (line 61) | def __getitem__(self, key: str) -> BaseComponent: method __setitem__ (line 65) | def __setitem__(self, key: str, value: BaseComponent): method __delitem__ (line 69) | def __delitem__(self, key: str): method __contains__ (line 73) | def __contains__(self, key: str) -> bool: method get (line 77) | def get( method settings (line 83) | def settings(self) -> dict: method options (line 91) | def options(self) -> dict: method get_random_name (line 95) | def get_random_name(self) -> str: method get_default_name (line 108) | def get_default_name(self) -> str: method get_random (line 127) | def get_random(self) -> BaseComponent: method get_default (line 131) | def get_default(self) -> BaseComponent: method get_highest_accuracy_name (line 142) | def get_highest_accuracy_name(self) -> str: method get_highest_accuracy (line 152) | def get_highest_accuracy(self) -> BaseComponent: method get_lowest_cost_name (line 163) | def get_lowest_cost_name(self) -> str: method get_lowest_cost (line 173) | def get_lowest_cost(self) -> BaseComponent: FILE: libs/ktem/ktem/db/base_models.py class BaseConversation (line 10) | class BaseConversation(SQLModel): class BaseUser (line 47) | class BaseUser(SQLModel): class BaseSettings (line 67) | class BaseSettings(SQLModel): class BaseIssueReport (line 85) | class BaseIssueReport(SQLModel): FILE: libs/ktem/ktem/db/models.py class Conversation (line 32) | class Conversation(_base_conv, table=True): # type: ignore class User (line 36) | class User(_base_user, table=True): # type: ignore class Settings (line 40) | class Settings(_base_settings, table=True): # type: ignore class IssueReport (line 44) | class IssueReport(_base_issue_report, table=True): # type: ignore FILE: libs/ktem/ktem/embeddings/db.py class Base (line 10) | class Base(DeclarativeBase): class BaseEmbeddingTable (line 14) | class BaseEmbeddingTable(Base): class EmbeddingTable (line 31) | class EmbeddingTable(_base_llm): # type: ignore FILE: libs/ktem/ktem/embeddings/manager.py class EmbeddingManager (line 13) | class EmbeddingManager: method __init__ (line 16) | def __init__(self): method load (line 37) | def load(self): method load_vendors (line 55) | def load_vendors(self): method __getitem__ (line 80) | def __getitem__(self, key: str) -> BaseEmbeddings: method __contains__ (line 84) | def __contains__(self, key: str) -> bool: method get (line 88) | def get( method settings (line 94) | def settings(self) -> dict: method options (line 102) | def options(self) -> dict: method get_random_name (line 106) | def get_random_name(self) -> str: method get_default_name (line 119) | def get_default_name(self) -> str: method get_random (line 136) | def get_random(self) -> BaseEmbeddings: method get_default (line 140) | def get_default(self) -> BaseEmbeddings: method info (line 151) | def info(self) -> dict: method add (line 155) | def add(self, name: str, spec: dict, default: bool): method delete (line 175) | def delete(self, name: str): method update (line 187) | def update(self, name: str, spec: dict, default: bool, new_name: str =... method vendors (line 221) | def vendors(self) -> dict: FILE: libs/ktem/ktem/embeddings/ui.py function format_description (line 13) | def format_description(cls): class EmbeddingManagement (line 23) | class EmbeddingManagement(BasePage): method __init__ (line 24) | def __init__(self, app): method on_building_ui (line 31) | def on_building_ui(self): method _on_app_created (line 132) | def _on_app_created(self): method on_emb_vendor_change (line 144) | def on_emb_vendor_change(self, vendor): method on_register_events (line 155) | def on_register_events(self): method create_emb (line 252) | def create_emb(self, name, choices, spec, default): method list_embeddings (line 269) | def list_embeddings(self): method select_emb (line 288) | def select_emb(self, emb_list, ev: gr.SelectData): method on_selected_emb_change (line 298) | def on_selected_emb_change(self, selected_emb_name): method on_btn_delete_click (line 337) | def on_btn_delete_click(self): method check_connection (line 344) | def check_connection(self, selected_emb_name, selected_spec): method save_emb (line 383) | def save_emb(self, selected_emb_name, edit_name, default, spec): method delete_emb (line 403) | def delete_emb(self, selected_emb_name): FILE: libs/ktem/ktem/exceptions.py class KHException (line 1) | class KHException(Exception): class HookNotDeclared (line 5) | class HookNotDeclared(KHException): class HookAlreadyDeclared (line 9) | class HookAlreadyDeclared(KHException): FILE: libs/ktem/ktem/extension_protocol.py function ktem_declare_extensions (line 8) | def ktem_declare_extensions() -> dict: # type: ignore FILE: libs/ktem/ktem/index/base.py class BaseIndex (line 14) | class BaseIndex(abc.ABC): method __init__ (line 56) | def __init__(self, app, id, name, config): method on_create (line 62) | def on_create(self): method on_delete (line 65) | def on_delete(self): method on_start (line 68) | def on_start(self): method get_selector_component_ui (line 77) | def get_selector_component_ui(self) -> Optional["BasePage"]: method get_index_page_ui (line 81) | def get_index_page_ui(self) -> Optional["BasePage"]: method get_user_settings (line 86) | def get_user_settings(cls) -> dict: method get_admin_settings (line 99) | def get_admin_settings(cls) -> dict: method get_indexing_pipeline (line 112) | def get_indexing_pipeline( method get_retriever_pipelines (line 128) | def get_retriever_pipelines( FILE: libs/ktem/ktem/index/file/base.py class BaseFileIndexRetriever (line 7) | class BaseFileIndexRetriever(BaseComponent): method get_user_settings (line 17) | def get_user_settings(cls) -> dict: method get_pipeline (line 27) | def get_pipeline( class BaseFileIndexIndexing (line 36) | class BaseFileIndexIndexing(BaseComponent): method run (line 61) | def run( method stream (line 77) | def stream( method get_pipeline (line 100) | def get_pipeline( method get_user_settings (line 106) | def get_user_settings(cls) -> dict: method copy_to_filestorage (line 115) | def copy_to_filestorage( method get_filestorage_path (line 140) | def get_filestorage_path(self, rel_paths: str | list[str]) -> list[str]: method warning (line 151) | def warning(self, msg): method rebuild_index (line 159) | def rebuild_index(self): FILE: libs/ktem/ktem/index/file/exceptions.py class FileExistsError (line 4) | class FileExistsError(KHException): FILE: libs/ktem/ktem/index/file/graph/graph_index.py class GraphRAGIndex (line 9) | class GraphRAGIndex(FileIndex): method _setup_indexing_cls (line 10) | def _setup_indexing_cls(self): method _setup_retriever_cls (line 13) | def _setup_retriever_cls(self): method get_indexing_pipeline (line 16) | def get_indexing_pipeline(self, settings, user_id) -> BaseFileIndexInd... method get_retriever_pipelines (line 25) | def get_retriever_pipelines( FILE: libs/ktem/ktem/index/file/graph/light_graph_index.py class LightRAGIndex (line 12) | class LightRAGIndex(GraphRAGIndex): method __init__ (line 13) | def __init__(self, app, id: int, name: str, config: dict): method _setup_indexing_cls (line 17) | def _setup_indexing_cls(self): method _setup_retriever_cls (line 20) | def _setup_retriever_cls(self): method _get_or_create_collection_graph_id (line 23) | def _get_or_create_collection_graph_id(self): method get_indexing_pipeline (line 42) | def get_indexing_pipeline(self, settings, user_id) -> BaseFileIndexInd... method get_retriever_pipelines (line 61) | def get_retriever_pipelines( FILE: libs/ktem/ktem/index/file/graph/lightrag_pipelines.py function get_llm_func (line 60) | def get_llm_func(model): function get_embedding_func (line 110) | def get_embedding_func(model): function get_default_models_wrapper (line 120) | def get_default_models_wrapper(): function prepare_graph_index_path (line 137) | def prepare_graph_index_path(graph_id: str): function list_of_list_to_df (line 144) | def list_of_list_to_df(data: list[list]) -> pd.DataFrame: function clean_quote (line 149) | def clean_quote(input: str) -> str: function lightrag_build_local_query_context (line 153) | async def lightrag_build_local_query_context( function build_graphrag (line 235) | def build_graphrag(working_dir, llm_func, embedding_func): class LightRAGIndexingPipeline (line 249) | class LightRAGIndexingPipeline(GraphRAGIndexingPipeline): method store_file_id_with_graph_id (line 256) | def store_file_id_with_graph_id(self, file_ids: list[str | None]): method get_user_settings (line 290) | def get_user_settings(cls) -> dict: method call_graphrag_index (line 324) | def call_graphrag_index(self, graph_id: str, docs: list[Document]): method stream (line 404) | def stream( class LightRAGRetrieverPipeline (line 416) | class LightRAGRetrieverPipeline(BaseFileIndexRetriever): method get_user_settings (line 424) | def get_user_settings(cls) -> dict: method _build_graph_search (line 435) | def _build_graph_search(self): method _to_document (line 463) | def _to_document(self, header: str, context_text: str) -> RetrievedDoc... method format_context_records (line 474) | def format_context_records( method plot_graph (line 501) | def plot_graph(self, relationships): method run (line 506) | def run( FILE: libs/ktem/ktem/index/file/graph/nano_graph_index.py class NanoGraphRAGIndex (line 12) | class NanoGraphRAGIndex(GraphRAGIndex): method __init__ (line 13) | def __init__(self, app, id: int, name: str, config: dict): method _setup_indexing_cls (line 17) | def _setup_indexing_cls(self): method _setup_retriever_cls (line 20) | def _setup_retriever_cls(self): method _get_or_create_collection_graph_id (line 23) | def _get_or_create_collection_graph_id(self): method get_indexing_pipeline (line 42) | def get_indexing_pipeline(self, settings, user_id) -> BaseFileIndexInd... method get_retriever_pipelines (line 61) | def get_retriever_pipelines( FILE: libs/ktem/ktem/index/file/graph/nano_pipelines.py function get_llm_func (line 58) | def get_llm_func(model): function get_embedding_func (line 108) | def get_embedding_func(model): function get_default_models_wrapper (line 118) | def get_default_models_wrapper(): function prepare_graph_index_path (line 135) | def prepare_graph_index_path(graph_id: str): function list_of_list_to_df (line 142) | def list_of_list_to_df(data: list[list]) -> pd.DataFrame: function clean_quote (line 147) | def clean_quote(input: str) -> str: function nano_graph_rag_build_local_query_context (line 151) | async def nano_graph_rag_build_local_query_context( function build_graphrag (line 227) | def build_graphrag(working_dir, llm_func, embedding_func): class NanoGraphRAGIndexingPipeline (line 237) | class NanoGraphRAGIndexingPipeline(GraphRAGIndexingPipeline): method store_file_id_with_graph_id (line 244) | def store_file_id_with_graph_id(self, file_ids: list[str | None]): method get_user_settings (line 278) | def get_user_settings(cls) -> dict: method call_graphrag_index (line 312) | def call_graphrag_index(self, graph_id: str, docs: list[Document]): method stream (line 392) | def stream( class NanoGraphRAGRetrieverPipeline (line 404) | class NanoGraphRAGRetrieverPipeline(BaseFileIndexRetriever): method get_user_settings (line 412) | def get_user_settings(cls) -> dict: method _build_graph_search (line 423) | def _build_graph_search(self): method _to_document (line 451) | def _to_document(self, header: str, context_text: str) -> RetrievedDoc... method format_context_records (line 462) | def format_context_records( method plot_graph (line 497) | def plot_graph(self, relationships): method run (line 502) | def run( FILE: libs/ktem/ktem/index/file/graph/pipelines.py function check_graphrag_api_key (line 55) | def check_graphrag_api_key(): function prepare_graph_index_path (line 59) | def prepare_graph_index_path(graph_id: str): class GraphRAGIndexingPipeline (line 66) | class GraphRAGIndexingPipeline(IndexDocumentPipeline): method route (line 69) | def route(self, file_path: str | Path) -> IndexPipeline: method store_file_id_with_graph_id (line 76) | def store_file_id_with_graph_id(self, file_ids: list[str | None]): method write_docs_to_files (line 98) | def write_docs_to_files(self, graph_id: str, docs: list[Document]): method call_graphrag_index (line 109) | def call_graphrag_index(self, graph_id: str, all_docs: list[Document]): method stream (line 154) | def stream( class GraphRAGRetrieverPipeline (line 171) | class GraphRAGRetrieverPipeline(BaseFileIndexRetriever): method get_user_settings (line 178) | def get_user_settings(cls) -> dict: method _build_graph_search (line 189) | def _build_graph_search(self): method _to_document (line 296) | def _to_document(self, header: str, context_text: str) -> RetrievedDoc... method format_context_records (line 307) | def format_context_records(self, context_records) -> list[RetrievedDoc... method plot_graph (line 345) | def plot_graph(self, context_records): method generate_relevant_scores (line 351) | def generate_relevant_scores(self, text, documents: list[RetrievedDocu... method run (line 354) | def run( FILE: libs/ktem/ktem/index/file/graph/visualize.py function create_knowledge_graph (line 6) | def create_knowledge_graph(df): function visualize_graph (line 20) | def visualize_graph(G): FILE: libs/ktem/ktem/index/file/index.py function generate_uuid (line 20) | def generate_uuid(): class FileIndex (line 24) | class FileIndex(BaseIndex): method __init__ (line 38) | def __init__(self, app, id: int, name: str, config: dict): method _setup_resources (line 51) | def _setup_resources(self): method _setup_indexing_cls (line 165) | def _setup_indexing_cls(self): method _setup_retriever_cls (line 199) | def _setup_retriever_cls(self): method _setup_file_selector_ui_cls (line 238) | def _setup_file_selector_ui_cls(self): method _setup_file_index_ui_cls (line 273) | def _setup_file_index_ui_cls(self): method on_create (line 308) | def on_create(self): method on_delete (line 334) | def on_delete(self): method on_start (line 346) | def on_start(self): method get_selector_component_ui (line 354) | def get_selector_component_ui(self): method get_index_page_ui (line 359) | def get_index_page_ui(self): method get_user_settings (line 364) | def get_user_settings(self): method get_admin_settings (line 377) | def get_admin_settings(cls): method get_indexing_pipeline (line 440) | def get_indexing_pipeline(self, settings, user_id) -> BaseFileIndexInd... method get_retriever_pipelines (line 462) | def get_retriever_pipelines( FILE: libs/ktem/ktem/index/file/knet/knet_index.py class KnowledgeNetworkFileIndex (line 9) | class KnowledgeNetworkFileIndex(FileIndex): method get_admin_settings (line 11) | def get_admin_settings(cls): method _setup_indexing_cls (line 19) | def _setup_indexing_cls(self): method _setup_retriever_cls (line 22) | def _setup_retriever_cls(self): method get_indexing_pipeline (line 25) | def get_indexing_pipeline(self, settings, user_id) -> BaseFileIndexInd... method get_retriever_pipelines (line 36) | def get_retriever_pipelines( FILE: libs/ktem/ktem/index/file/knet/pipelines.py class KnetIndexingPipeline (line 16) | class KnetIndexingPipeline(IndexDocumentPipeline): method get_user_settings (line 23) | def get_user_settings(cls): method route (line 35) | def route(self, file_path: str | Path) -> IndexPipeline: class KnetRetrievalPipeline (line 45) | class KnetRetrievalPipeline(BaseFileIndexRetriever): method encode_image_base64 (line 51) | def encode_image_base64(self, image_path: str | Path) -> bytes | str: method run (line 59) | def run( method get_user_settings (line 119) | def get_user_settings(cls) -> dict: method get_pipeline (line 146) | def get_pipeline(cls, user_settings, index_settings, selected): FILE: libs/ktem/ktem/index/file/pipelines.py function dev_settings (line 56) | def dev_settings(): class DocumentRetrievalPipeline (line 80) | class DocumentRetrievalPipeline(BaseFileIndexRetriever): method vector_retrieval (line 104) | def vector_retrieval(self) -> VectorRetrieval: method run (line 113) | def run( method generate_relevant_scores (line 213) | def generate_relevant_scores( method get_user_settings (line 224) | def get_user_settings(cls) -> dict: method get_pipeline (line 281) | def get_pipeline(cls, user_settings, index_settings, selected): class IndexPipeline (line 328) | class IndexPipeline(BaseComponent): method vector_indexing (line 347) | def vector_indexing(self) -> VectorIndexing: method handle_docs (line 352) | def handle_docs(self, docs, file_id, file_name) -> Generator[Document,... method handle_chunks_docstore (line 424) | def handle_chunks_docstore(self, chunks, file_id): method handle_chunks_vectorstore (line 443) | def handle_chunks_vectorstore(self, chunks, file_id): method get_id_if_exists (line 464) | def get_id_if_exists(self, file_path: str | Path) -> Optional[str]: method store_url (line 490) | def store_url(self, url: str) -> str: method store_file (line 513) | def store_file(self, file_path: Path) -> str: method finish (line 539) | def finish(self, file_id: str, file_path: str | Path) -> str: method get_token_func (line 568) | def get_token_func(self): method delete_file (line 572) | def delete_file(self, file_id: str): method run (line 597) | def run( method stream (line 602) | def stream( class IndexDocumentPipeline (line 657) | class IndexDocumentPipeline(BaseFileIndexIndexing): method readers (line 674) | def readers(self): method get_user_settings (line 690) | def get_user_settings(cls): method get_pipeline (line 709) | def get_pipeline(cls, user_settings, index_settings) -> BaseFileIndexI... method is_url (line 723) | def is_url(self, file_path: str | Path) -> bool: method route (line 728) | def route(self, file_path: str | Path) -> IndexPipeline: method run (line 776) | def run( method stream (line 781) | def stream( FILE: libs/ktem/ktem/index/file/ui.py class File (line 78) | class File(gr.File): method _process_single_file (line 84) | def _process_single_file(self, f: FileData) -> NamedString | bytes: class DirectoryUpload (line 104) | class DirectoryUpload(BasePage): method __init__ (line 105) | def __init__(self, app, index): method on_building_ui (line 116) | def on_building_ui(self): class FileIndexPage (line 131) | class FileIndexPage(BasePage): method __init__ (line 132) | def __init__(self, app, index): method upload_instruction (line 150) | def upload_instruction(self) -> str: method render_file_list (line 166) | def render_file_list(self): method render_group_list (line 235) | def render_group_list(self): method on_building_ui (line 286) | def on_building_ui(self): method on_subscribe_public_events (line 342) | def on_subscribe_public_events(self): method file_selected (line 395) | def file_selected(self, file_id): method delete_event (line 447) | def delete_event(self, file_id): method delete_no_event (line 481) | def delete_no_event(self): method download_single_file (line 487) | def download_single_file(self, is_zipped_state, file_id): method download_single_file_simple (line 523) | def download_single_file_simple(self, is_zipped_state, file_html, file... method download_all_files (line 551) | def download_all_files(self): method delete_all_files (line 569) | def delete_all_files(self, file_list): method set_file_id_selector (line 573) | def set_file_id_selector(self, selected_file_id): method show_delete_all_confirm (line 576) | def show_delete_all_confirm(self, file_list): method on_register_quick_uploads (line 594) | def on_register_quick_uploads(self): method on_register_events (line 726) | def on_register_events(self): method _on_app_created (line 1039) | def _on_app_created(self): method _may_extract_zip (line 1058) | def _may_extract_zip(self, files, zip_dir: str): method index_fn (line 1092) | def index_fn( method index_fn_file_with_default_loaders (line 1163) | def index_fn_file_with_default_loaders( method index_fn_url_with_default_loaders (line 1203) | def index_fn_url_with_default_loaders( method index_files_from_dir (line 1267) | def index_files_from_dir( method format_size_human_readable (line 1340) | def format_size_human_readable(self, num: float | str, suffix="B"): method list_file (line 1352) | def list_file(self, user_id, name_pattern=""): method list_file_names (line 1407) | def list_file_names(self, file_list_state): method list_group (line 1415) | def list_group(self, user_id, file_list): method set_group_id_selector (line 1482) | def set_group_id_selector(self, selected_group_id): method save_group (line 1494) | def save_group(self, group_id, group_name, group_files, user_id): method delete_group (line 1531) | def delete_group(self, group_id): method interact_file_list (line 1551) | def interact_file_list(self, list_files, ev: gr.SelectData): method interact_group_list (line 1563) | def interact_group_list(self, list_groups, ev: gr.SelectData): method validate_files (line 1577) | def validate_files(self, files: list[str]): method validate_urls (line 1606) | def validate_urls(self, urls: list[str]): class FileSelector (line 1615) | class FileSelector(BasePage): method __init__ (line 1618) | def __init__(self, app, index): method default (line 1623) | def default(self): method on_building_ui (line 1628) | def on_building_ui(self): method on_register_events (line 1654) | def on_register_events(self): method as_gradio_component (line 1669) | def as_gradio_component(self): method get_selected_ids (line 1672) | def get_selected_ids(self, components): method load_files (line 1695) | def load_files(self, selected_files, user_id): method _on_app_created (line 1739) | def _on_app_created(self): method on_subscribe_public_events (line 1746) | def on_subscribe_public_events(self): FILE: libs/ktem/ktem/index/file/utils.py function clean_name (line 14) | def clean_name(name): function is_arxiv_url (line 20) | def is_arxiv_url(url): function download_arxiv_pdf (line 25) | def download_arxiv_pdf(url, output_path): FILE: libs/ktem/ktem/index/manager.py class IndexManager (line 12) | class IndexManager: method __init__ (line 23) | def __init__(self, app): method index_types (line 29) | def index_types(self) -> dict: method build_index (line 33) | def build_index(self, name: str, config: dict, index_type: str): method update_index (line 72) | def update_index(self, id: int, name: str, config: dict): method start_index (line 95) | def start_index(self, id: int, name: str, config: dict, index_type: str): method delete_index (line 111) | def delete_index(self, id: int): method load_index_types (line 143) | def load_index_types(self): method exists (line 158) | def exists(self, id: Optional[int] = None, name: Optional[str] = None)... method on_application_startup (line 179) | def on_application_startup(self): method indices (line 196) | def indices(self): method info (line 199) | def info(self): FILE: libs/ktem/ktem/index/models.py class Index (line 9) | class Index(SQLModel, table=True): FILE: libs/ktem/ktem/index/ui.py function update_current_module_atime (line 11) | def update_current_module_atime(): function format_description (line 25) | def format_description(cls): class IndexManagement (line 35) | class IndexManagement(BasePage): method __init__ (line 36) | def __init__(self, app): method on_building_ui (line 44) | def on_building_ui(self): method _on_app_created (line 110) | def _on_app_created(self): method on_register_events (line 126) | def on_register_events(self): method on_index_type_change (line 224) | def on_index_type_change(self, index_type: str): method create_index (line 241) | def create_index(self, name: str, index_type: str, config: str): method list_indices (line 261) | def list_indices(self): method select_index (line 280) | def select_index(self, index_list, ev: gr.SelectData) -> int: method on_selected_index_change (line 291) | def on_selected_index_change(self, selected_index_id: int): method update_index (line 316) | def update_index(self, selected_index_id: int, name: str, config: str): method delete_index (line 337) | def delete_index(self, selected_index_id): FILE: libs/ktem/ktem/llms/db.py class Base (line 10) | class Base(DeclarativeBase): class BaseLLMTable (line 14) | class BaseLLMTable(Base): class LLMTable (line 31) | class LLMTable(_base_llm): # type: ignore FILE: libs/ktem/ktem/llms/manager.py class LLMManager (line 13) | class LLMManager: method __init__ (line 16) | def __init__(self): method load (line 39) | def load(self): method load_vendors (line 56) | def load_vendors(self): method __getitem__ (line 80) | def __getitem__(self, key: str) -> ChatLLM: method __contains__ (line 84) | def __contains__(self, key: str) -> bool: method get (line 89) | def get(self, key: str, default: None) -> Optional[ChatLLM]: method get (line 93) | def get(self, key: str, default: ChatLLM) -> ChatLLM: method get (line 96) | def get(self, key: str, default: Optional[ChatLLM] = None) -> Optional... method settings (line 100) | def settings(self) -> dict: method options (line 108) | def options(self) -> dict: method get_random_name (line 112) | def get_random_name(self) -> str: method get_default_name (line 125) | def get_default_name(self) -> str: method get_random (line 142) | def get_random(self) -> ChatLLM: method get_default (line 146) | def get_default(self) -> ChatLLM: method info (line 157) | def info(self) -> dict: method add (line 161) | def add(self, name: str, spec: dict, default: bool): method delete (line 182) | def delete(self, name: str): method update (line 194) | def update(self, name: str, spec: dict, default: bool, new_name: str =... method vendors (line 228) | def vendors(self) -> dict: FILE: libs/ktem/ktem/llms/ui.py function format_description (line 13) | def format_description(cls): class LLMManagement (line 23) | class LLMManagement(BasePage): method __init__ (line 24) | def __init__(self, app): method on_building_ui (line 31) | def on_building_ui(self): method _on_app_created (line 131) | def _on_app_created(self): method on_llm_vendor_change (line 143) | def on_llm_vendor_change(self, vendor): method on_register_events (line 154) | def on_register_events(self): method create_llm (line 251) | def create_llm(self, name, choices, spec, default): method list_llms (line 268) | def list_llms(self): method select_llm (line 287) | def select_llm(self, llm_list, ev: gr.SelectData): method on_selected_llm_change (line 297) | def on_selected_llm_change(self, selected_llm_name): method on_btn_delete_click (line 336) | def on_btn_delete_click(self): method check_connection (line 343) | def check_connection(self, selected_llm_name: str, selected_spec): method save_llm (line 382) | def save_llm(self, selected_llm_name, edit_name, default, spec): method delete_llm (line 400) | def delete_llm(self, selected_llm_name): FILE: libs/ktem/ktem/main.py function toggle_first_setup_visibility (line 21) | def toggle_first_setup_visibility(): class App (line 28) | class App(BaseApp): method ui (line 42) | def ui(self): method on_subscribe_public_events (line 127) | def on_subscribe_public_events(self): method _on_app_created (line 202) | def _on_app_created(self): FILE: libs/ktem/ktem/mcp/db.py class Base (line 7) | class Base(DeclarativeBase): class BaseMCPTable (line 11) | class BaseMCPTable(Base): class MCPTable (line 20) | class MCPTable(BaseMCPTable): FILE: libs/ktem/ktem/mcp/manager.py class MCPManager (line 17) | class MCPManager: method __init__ (line 20) | def __init__(self): method load (line 24) | def load(self): method info (line 36) | def info(self) -> dict: method get (line 40) | def get(self, name: str) -> dict | None: method add (line 44) | def add(self, name: str, config: dict): method update (line 57) | def update(self, name: str, config: dict): method delete (line 71) | def delete(self, name: str): method get_enabled_tools (line 81) | def get_enabled_tools(self) -> list[str]: FILE: libs/ktem/ktem/mcp/ui.py class MCPManagement (line 24) | class MCPManagement(BasePage): method __init__ (line 25) | def __init__(self, app): method on_building_ui (line 29) | def on_building_ui(self): method _on_app_created (line 90) | def _on_app_created(self): method on_register_events (line 98) | def on_register_events(self): method _fetch_tools_markdown (line 180) | def _fetch_tools_markdown(self, config: dict) -> str: method create_server (line 189) | def create_server(self, config_str): method fetch_tools_for_add (line 239) | def fetch_tools_for_add(self, config_str): method fetch_tools_for_view (line 262) | def fetch_tools_for_view(self, selected_name): method list_servers (line 272) | def list_servers(self): method select_server (line 286) | def select_server(self, mcp_list, ev: gr.SelectData): method on_selected_server_change (line 294) | def on_selected_server_change(self, selected_name): method on_btn_delete_click (line 320) | def on_btn_delete_click(self): method delete_server (line 327) | def delete_server(self, selected_name): method save_server (line 336) | def save_server(self, selected_name, config_str): FILE: libs/ktem/ktem/pages/chat/__init__.py class ChatPage (line 200) | class ChatPage(BasePage): method __init__ (line 201) | def __init__(self, app): method on_building_ui (line 217) | def on_building_ui(self): method _json_to_plot (line 402) | def _json_to_plot(self, json_dict: dict | None): method on_register_events (line 410) | def on_register_events(self): method submit_msg (line 873) | def submit_msg( method get_recommendations (line 980) | def get_recommendations(self, first_selector_choices, file_ids): method toggle_delete (line 991) | def toggle_delete(self, conv_id): method on_set_public_conversation (line 997) | def on_set_public_conversation(self, is_public, convo_id): method on_subscribe_public_events (line 1019) | def on_subscribe_public_events(self): method _on_app_created (line 1053) | def _on_app_created(self): method persist_data_source (line 1075) | def persist_data_source( method reasoning_changed (line 1136) | def reasoning_changed(self, reasoning_type): method is_liked (line 1142) | def is_liked(self, convo_id, liked: gr.LikeData): method message_selected (line 1156) | def message_selected(self, retrieval_history, plot_history, msg: gr.Se... method create_pipeline (line 1168) | def create_pipeline( method chat_fn (line 1266) | def chat_fn( method check_and_suggest_name_conv (line 1370) | def check_and_suggest_name_conv(self, chat_history): method suggest_chat_conv (line 1385) | def suggest_chat_conv( FILE: libs/ktem/ktem/pages/chat/chat_panel.py class ChatPanel (line 21) | class ChatPanel(BasePage): method __init__ (line 22) | def __init__(self, app): method on_building_ui (line 26) | def on_building_ui(self): method submit_msg (line 49) | def submit_msg(self, chat_input, chat_history): FILE: libs/ktem/ktem/pages/chat/chat_suggestion.py class ChatSuggestion (line 6) | class ChatSuggestion(BasePage): method __init__ (line 17) | def __init__(self, app): method on_building_ui (line 21) | def on_building_ui(self): method as_gradio_component (line 38) | def as_gradio_component(self): method select_example (line 41) | def select_example(self, ev: gr.SelectData): FILE: libs/ktem/ktem/pages/chat/control.py function is_conv_name_valid (line 33) | def is_conv_name_valid(name): class ConversationControl (line 44) | class ConversationControl(BasePage): method __init__ (line 47) | def __init__(self, app): method on_building_ui (line 52) | def on_building_ui(self): method load_chat_history (line 201) | def load_chat_history(self, user_id): method reload_conv (line 252) | def reload_conv(self, user_id): method new_conv (line 259) | def new_conv(self, user_id): method delete_conv (line 275) | def delete_conv(self, conversation_id, user_id): method select_conv (line 299) | def select_conv(self, conversation_id, user_id): method rename_conv (line 379) | def rename_conv(self, conversation_id, new_name, is_renamed, user_id): method persist_chat_suggestions (line 412) | def persist_chat_suggestions( method toggle_demo_login_visibility (line 442) | def toggle_demo_login_visibility(self, user_api_key, request: gr.Reque... method _on_app_created (line 465) | def _on_app_created(self): FILE: libs/ktem/ktem/pages/chat/demo_hint.py class HintPage (line 7) | class HintPage(BasePage): method __init__ (line 8) | def __init__(self, app): method on_building_ui (line 12) | def on_building_ui(self): FILE: libs/ktem/ktem/pages/chat/paper_list.py class PaperListPage (line 8) | class PaperListPage(BasePage): method __init__ (line 9) | def __init__(self, app): method on_building_ui (line 13) | def on_building_ui(self): method load (line 29) | def load(self): method _on_app_created (line 34) | def _on_app_created(self): method select_example (line 40) | def select_example(self, state, ev: gr.SelectData): FILE: libs/ktem/ktem/pages/chat/report.py class ReportIssue (line 9) | class ReportIssue(BasePage): method __init__ (line 10) | def __init__(self, app): method on_building_ui (line 14) | def on_building_ui(self): method report (line 44) | def report( FILE: libs/ktem/ktem/pages/help.py function get_remote_doc (line 13) | def get_remote_doc(url: str) -> str: function download_changelogs (line 23) | def download_changelogs(release_url: str) -> str: class HelpPage (line 34) | class HelpPage: method __init__ (line 35) | def __init__( FILE: libs/ktem/ktem/pages/login.py class LoginPage (line 26) | class LoginPage(BasePage): method __init__ (line 30) | def __init__(self, app): method on_building_ui (line 34) | def on_building_ui(self): method on_register_events (line 40) | def on_register_events(self): method toggle_login_visibility (line 56) | def toggle_login_visibility(self, user_id): method _on_app_created (line 63) | def _on_app_created(self): method on_subscribe_public_events (line 78) | def on_subscribe_public_events(self): method login (line 89) | def login(self, usn, pwd, request: gr.Request): FILE: libs/ktem/ktem/pages/resources/__init__.py class ResourcesTab (line 14) | class ResourcesTab(BasePage): method __init__ (line 15) | def __init__(self, app): method on_building_ui (line 19) | def on_building_ui(self): method on_subscribe_public_events (line 39) | def on_subscribe_public_events(self): method toggle_user_management (line 61) | def toggle_user_management(self, user_id): FILE: libs/ktem/ktem/pages/resources/user.py function validate_username (line 30) | def validate_username(usn): function validate_password (line 51) | def validate_password(pwd, pwd_cnf): function create_user (line 97) | def create_user(usn, pwd, user_id=None, is_admin=True) -> bool: class UserManagement (line 120) | class UserManagement(BasePage): method __init__ (line 121) | def __init__(self, app): method on_building_ui (line 135) | def on_building_ui(self): method on_register_events (line 181) | def on_register_events(self): method on_subscribe_public_events (line 262) | def on_subscribe_public_events(self): method create_user (line 286) | def create_user(self, usn, pwd, pwd_cnf): method list_users (line 315) | def list_users(self, user_id): method select_user (line 343) | def select_user(self, user_list, ev: gr.SelectData): method on_selected_user_change (line 353) | def on_selected_user_change(self, selected_user_id): method on_btn_delete_click (line 392) | def on_btn_delete_click(self, selected_user_id): method save_user (line 406) | def save_user(self, selected_user_id, usn, pwd, pwd_cnf, admin): method delete_user (line 443) | def delete_user(self, current_user, selected_user_id): FILE: libs/ktem/ktem/pages/settings.py function render_setting_item (line 36) | def render_setting_item(setting_item, value): class SettingsPage (line 59) | class SettingsPage(BasePage): method __init__ (line 68) | def __init__(self, app): method on_building_ui (line 117) | def on_building_ui(self): method on_subscribe_public_events (line 133) | def on_subscribe_public_events(self): method on_register_events (line 187) | def on_register_events(self): method user_tab (line 234) | def user_tab(self): method change_password (line 253) | def change_password(self, user_id, password, password_confirm): method app_tab (line 277) | def app_tab(self): method index_tab (line 287) | def index_tab(self): method reasoning_tab (line 307) | def reasoning_tab(self): method change_reasoning_mode (line 347) | def change_reasoning_mode(self, value): method load_setting (line 356) | def load_setting(self, user_id=None): method save_setting (line 368) | def save_setting(self, user_id: int, *args): method components (line 394) | def components(self) -> list: method component_names (line 401) | def component_names(self): method _on_app_created (line 405) | def _on_app_created(self): FILE: libs/ktem/ktem/pages/setup.py function pull_model (line 25) | def pull_model(name: str, stream: bool = True): class SetupPage (line 49) | class SetupPage(BasePage): method __init__ (line 53) | def __init__(self, app): method on_building_ui (line 57) | def on_building_ui(self): method on_register_events (line 139) | def on_register_events(self): method update_model (line 189) | def update_model( method update_default_settings (line 393) | def update_default_settings(self, radio_model_value, default_settings): method switch_options_view (line 402) | def switch_options_view(self, radio_model_value): FILE: libs/ktem/ktem/reasoning/base.py class BaseReasoning (line 6) | class BaseReasoning(BaseComponent): method get_info (line 18) | def get_info(cls) -> dict: method get_user_settings (line 31) | def get_user_settings(cls) -> dict: method get_pipeline (line 36) | def get_pipeline( method run (line 51) | def run(self, message: str, conv_id: str, history: list, **kwargs): #... FILE: libs/ktem/ktem/reasoning/prompt_optimization/decompose_question.py class SubQuery (line 13) | class SubQuery(BaseModel): class DecomposeQuestionPipeline (line 22) | class DecomposeQuestionPipeline(RewriteQuestionPipeline): method create_prompt (line 45) | def create_prompt(self, question): method run (line 65) | def run(self, question: str) -> list: # type: ignore FILE: libs/ktem/ktem/reasoning/prompt_optimization/fewshot_rewrite_question.py class FewshotRewriteQuestionPipeline (line 19) | class FewshotRewriteQuestionPipeline(RewriteQuestionPipeline): method add_documents (line 40) | def add_documents(self, examples, batch_size: int = 50): method get_pipeline (line 59) | def get_pipeline( method run (line 79) | def run(self, question: str) -> Document: # type: ignore FILE: libs/ktem/ktem/reasoning/prompt_optimization/mindmap.py class CreateMindmapPipeline (line 37) | class CreateMindmapPipeline(BaseComponent): method convert_uml_to_markdown (line 67) | def convert_uml_to_markdown(cls, text: str) -> str: method run (line 80) | def run(self, question: str, context: str) -> Document: # type: ignore FILE: libs/ktem/ktem/reasoning/prompt_optimization/rewrite_question.py class RewriteQuestionPipeline (line 17) | class RewriteQuestionPipeline(BaseComponent): method run (line 31) | def run(self, question: str) -> Document: # type: ignore FILE: libs/ktem/ktem/reasoning/prompt_optimization/suggest_conversation_name.py class SuggestConvNamePipeline (line 11) | class SuggestConvNamePipeline(BaseComponent): method run (line 25) | def run(self, chat_history: list[tuple[str, str]]) -> Document: # typ... FILE: libs/ktem/ktem/reasoning/prompt_optimization/suggest_followup_chat.py class SuggestFollowupQuesPipeline (line 11) | class SuggestFollowupQuesPipeline(BaseComponent): method run (line 32) | def run(self, chat_history: list[tuple[str, str]]) -> Document: FILE: libs/ktem/ktem/reasoning/react.py class DocSearchArgs (line 30) | class DocSearchArgs(BaseModel): class DocSearchTool (line 34) | class DocSearchTool(BaseTool): method _run_tool (line 47) | def _run_tool(self, query: AnyStr) -> AnyStr: method prepare_evidence (line 58) | def prepare_evidence(self, docs, trim_len: int = 4000): class RewriteQuestionPipeline (line 157) | class RewriteQuestionPipeline(BaseComponent): method run (line 171) | def run(self, question: str) -> Document: # type: ignore class ReactAgentPipeline (line 181) | class ReactAgentPipeline(BaseReasoning): class Config (line 184) | class Config: method prepare_citation (line 192) | def prepare_citation(self, step_id, step, output, status) -> Document: method ainvoke (line 212) | async def ainvoke( # type: ignore method stream (line 229) | def stream(self, message, conv_id: str, history: list, **kwargs): method get_pipeline (line 262) | def get_pipeline( method get_user_settings (line 309) | def get_user_settings(cls) -> dict: method get_info (line 353) | def get_info(cls) -> dict: FILE: libs/ktem/ktem/reasoning/rewoo.py class DocSearchArgs (line 67) | class DocSearchArgs(BaseModel): class DocSearchTool (line 71) | class DocSearchTool(BaseTool): method _run_tool (line 84) | def _run_tool(self, query: AnyStr) -> AnyStr: method prepare_evidence (line 95) | def prepare_evidence(self, docs, trim_len: int = 3000): class RewriteQuestionPipeline (line 176) | class RewriteQuestionPipeline(BaseComponent): method run (line 190) | def run(self, question: str) -> Document: # type: ignore function find_text (line 200) | def find_text(llm_output, context): class RewooAgentPipeline (line 211) | class RewooAgentPipeline(BaseReasoning): class Config (line 214) | class Config: method format_info_panel_evidence (line 223) | def format_info_panel_evidence(self, worker_log): method format_info_panel_planner (line 254) | def format_info_panel_planner(self, planner_output): method prepare_citation (line 265) | def prepare_citation(self, answer) -> list[Document]: method ainvoke (line 336) | async def ainvoke( # type: ignore method stream (line 349) | def stream( # type: ignore method get_pipeline (line 387) | def get_pipeline( method get_user_settings (line 445) | def get_user_settings(cls) -> dict: method get_info (line 507) | def get_info(cls) -> dict: FILE: libs/ktem/ktem/reasoning/simple.py class AddQueryContextPipeline (line 42) | class AddQueryContextPipeline(BaseComponent): method run (line 47) | def run(self, question: str, history: list) -> Document: class FullQAPipeline (line 86) | class FullQAPipeline(BaseReasoning): class Config (line 89) | class Config: method retrieve (line 108) | def retrieve( method prepare_mindmap (line 166) | def prepare_mindmap(self, answer) -> Document | None: method prepare_citation_viz (line 206) | def prepare_citation_viz(self, answer, question, docs) -> Document | N... method show_citations_and_addons (line 223) | def show_citations_and_addons(self, answer, docs, question): method ainvoke (line 276) | async def ainvoke( # type: ignore method stream (line 281) | def stream( # type: ignore method prepare_pipeline_instance (line 334) | def prepare_pipeline_instance(cls, settings, retrievers): method get_pipeline (line 341) | def get_pipeline(cls, settings, states, retrievers): method get_user_settings (line 398) | def get_user_settings(cls) -> dict: method get_info (line 475) | def get_info(cls) -> dict: class FullDecomposeQAPipeline (line 487) | class FullDecomposeQAPipeline(FullQAPipeline): method answer_sub_questions (line 488) | def answer_sub_questions( method stream (line 521) | def stream( # type: ignore method get_user_settings (line 579) | def get_user_settings(cls) -> dict: method prepare_pipeline_instance (line 588) | def prepare_pipeline_instance(cls, settings, retrievers): method get_info (line 599) | def get_info(cls) -> dict: FILE: libs/ktem/ktem/rerankings/db.py class Base (line 10) | class Base(DeclarativeBase): class BaseRerankingTable (line 14) | class BaseRerankingTable(Base): class RerankingTable (line 31) | class RerankingTable(__base_reranking): # type: ignore FILE: libs/ktem/ktem/rerankings/manager.py class RerankingManager (line 13) | class RerankingManager: method __init__ (line 16) | def __init__(self): method load (line 37) | def load(self): method load_vendors (line 54) | def load_vendors(self): method __getitem__ (line 63) | def __getitem__(self, key: str) -> BaseReranking: method __contains__ (line 67) | def __contains__(self, key: str) -> bool: method get (line 71) | def get( method settings (line 77) | def settings(self) -> dict: method options (line 85) | def options(self) -> dict: method get_random_name (line 89) | def get_random_name(self) -> str: method get_default_name (line 102) | def get_default_name(self) -> str: method get_random (line 119) | def get_random(self) -> BaseReranking: method get_default (line 123) | def get_default(self) -> BaseReranking: method info (line 134) | def info(self) -> dict: method add (line 138) | def add(self, name: str, spec: dict, default: bool): method delete (line 157) | def delete(self, name: str): method update (line 169) | def update(self, name: str, spec: dict, default: bool, new_name: str =... method vendors (line 202) | def vendors(self) -> dict: FILE: libs/ktem/ktem/rerankings/ui.py function format_description (line 15) | def format_description(cls): class RerankingManagement (line 25) | class RerankingManagement(BasePage): method __init__ (line 26) | def __init__(self, app): method on_building_ui (line 33) | def on_building_ui(self): method _on_app_created (line 134) | def _on_app_created(self): method on_rerank_vendor_change (line 146) | def on_rerank_vendor_change(self, vendor): method on_register_events (line 157) | def on_register_events(self): method create_rerank (line 251) | def create_rerank(self, name, choices, spec, default): method list_rerankings (line 268) | def list_rerankings(self): method select_rerank (line 287) | def select_rerank(self, rerank_list, ev: gr.SelectData): method on_selected_rerank_change (line 297) | def on_selected_rerank_change(self, selected_rerank_name): method on_btn_delete_click (line 336) | def on_btn_delete_click(self): method check_connection (line 343) | def check_connection(self, selected_rerank_name, selected_spec): method save_rerank (line 382) | def save_rerank(self, selected_rerank_name, edit_name, default, spec): method delete_rerank (line 404) | def delete_rerank(self, selected_rerank_name): FILE: libs/ktem/ktem/settings.py class SettingItem (line 6) | class SettingItem(BaseModel): class BaseSettingGroup (line 25) | class BaseSettingGroup(BaseModel): method _get_options (line 29) | def _get_options(self) -> dict: method finalize (line 32) | def finalize(self): method flatten (line 35) | def flatten(self) -> dict: method get_setting_item (line 45) | def get_setting_item(self, path: str) -> SettingItem: method __bool__ (line 59) | def __bool__(self): class SettingReasoningGroup (line 63) | class SettingReasoningGroup(BaseSettingGroup): method _get_options (line 64) | def _get_options(self) -> dict: method finalize (line 72) | def finalize(self): class SettingIndexOption (line 80) | class SettingIndexOption(BaseSettingGroup): method flatten (line 88) | def flatten(self) -> dict: method get_setting_item (line 99) | def get_setting_item(self, path: str) -> SettingItem: class SettingIndexGroup (line 113) | class SettingIndexGroup(BaseSettingGroup): method _get_options (line 114) | def _get_options(self) -> dict: class SettingGroup (line 123) | class SettingGroup(BaseModel): method flatten (line 128) | def flatten(self) -> dict: method get_setting_item (line 142) | def get_setting_item(self, path: str) -> SettingItem: FILE: libs/ktem/ktem/utils/conversation.py function sync_retrieval_n_message (line 4) | def sync_retrieval_n_message( function get_file_names_regex (line 22) | def get_file_names_regex(input_str: str) -> tuple[list[str], str]: function get_urls (line 32) | def get_urls(input_str: str) -> tuple[list[str], str]: FILE: libs/ktem/ktem/utils/file.py class YAMLNoDateSafeLoader (line 4) | class YAMLNoDateSafeLoader(yaml.SafeLoader): method remove_implicit_resolver (line 8) | def remove_implicit_resolver(cls, tag_to_remove): FILE: libs/ktem/ktem/utils/generator.py class Generator (line 1) | class Generator: method __init__ (line 4) | def __init__(self, gen): method __iter__ (line 7) | def __iter__(self): FILE: libs/ktem/ktem/utils/hf_papers.py function parse_date (line 16) | def parse_date(date_str): function get_recommendations_from_semantic_scholar (line 21) | def get_recommendations_from_semantic_scholar(semantic_scholar_id: str): function filter_recommendations (line 36) | def filter_recommendations(recommendations, max_paper_count=5): function format_recommendation_into_markdown (line 46) | def format_recommendation_into_markdown(recommendations): function get_paper_id_from_name (line 55) | def get_paper_id_from_name(paper_name): function get_recommended_papers (line 70) | def get_recommended_papers(paper_name): function fetch_papers (line 83) | def fetch_papers(top_n=5): FILE: libs/ktem/ktem/utils/plantuml.py class PlantUMLError (line 27) | class PlantUMLError(Exception): class PlantUMLConnectionError (line 33) | class PlantUMLConnectionError(PlantUMLError): class PlantUMLHTTPError (line 39) | class PlantUMLHTTPError(PlantUMLConnectionError): method __init__ (line 44) | def __init__(self, response, content, *args, **kwdargs): function deflate_and_encode (line 53) | def deflate_and_encode(plantuml_text): class PlantUML (line 62) | class PlantUML(object): method __init__ (line 73) | def __init__(self, url="http://www.plantuml.com/plantuml/svg/", reques... method get_url (line 80) | def get_url(self, plantuml_text): method process (line 89) | def process(self, plantuml_text): FILE: libs/ktem/ktem/utils/rate_limit.py function check_rate_limit (line 15) | def check_rate_limit(limit_type: str, request: gr.Request): FILE: libs/ktem/ktem/utils/render.py function is_close (line 11) | def is_close(val1, val2, tolerance=1e-9): function replace_mardown_header (line 15) | def replace_mardown_header(text: str) -> str: function get_header (line 28) | def get_header(doc: RetrievedDocument) -> str: class Render (line 38) | class Render: method collapsible (line 42) | def collapsible(header, content, open: bool = False) -> str: method table (line 52) | def table(text: str) -> str: method table_preserve_linebreaks (line 64) | def table_preserve_linebreaks(text: str) -> str: method preview (line 75) | def preview( method highlight (line 126) | def highlight(text: str, elem_id: str | None = None) -> str: method image (line 132) | def image(url: str, text: str = "") -> str: method collapsible_with_header (line 141) | def collapsible_with_header( method collapsible_with_header_score (line 160) | def collapsible_with_header_score( FILE: libs/ktem/ktem/utils/visualize_cited.py class CreateCitationVizPipeline (line 27) | class CreateCitationVizPipeline(BaseComponent): method _set_up_umap (line 33) | def _set_up_umap(self, embeddings: np.ndarray): method _project_embeddings (line 37) | def _project_embeddings(self, embeddings, umap_transform) -> np.ndarray: method _get_projections (line 43) | def _get_projections(self, embeddings, umap_transform): method _prepare_projection_df (line 49) | def _prepare_projection_df( method _plot_embeddings (line 71) | def _plot_embeddings(self, df: pd.DataFrame) -> go.Figure: method run (line 113) | def run(self, context: List[str], question: str): FILE: libs/ktem/ktem_tests/test_qa.py function mock_openai_embedding (line 41) | def mock_openai_embedding(monkeypatch): function test_ingest_pipeline (line 49) | def test_ingest_pipeline(patch, mock_openai_embedding, tmp_path): FILE: libs/ktem/migrations/env.py function run_migrations_offline (line 30) | def run_migrations_offline() -> None: function run_migrations_online (line 53) | def run_migrations_online() -> None: FILE: scripts/migrate/migrate_chroma_db.py function _init_resource (line 22) | def _init_resource(private: bool = True, id: int = 1): function get_chromadb_collection (line 95) | def get_chromadb_collection( function update_metadata (line 106) | def update_metadata(metadata, file_id): function migrate_chroma_db (line 112) | def migrate_chroma_db( function main (line 165) | def main(chroma_db_dir: str, sqlite_path: str): FILE: scripts/serve_local.py function serve_llamacpp_python (line 17) | def serve_llamacpp_python(local_model_file: Path, **kwargs): function main (line 53) | def main(): FILE: sso_app.py function favicon (line 66) | async def favicon(): FILE: sso_app_demo.py function add_session_middleware (line 27) | def add_session_middleware(app): function public (line 56) | def public(request: Request): function favicon (line 62) | async def favicon(): function logout (line 67) | async def logout(request: Request): function login (line 73) | async def login(request: Request): function auth (line 80) | async def auth(request: Request): FILE: templates/project-default/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/pipeline.py class QAResultLog (line 12) | class QAResultLog(ResultLog): method _get_prompt (line 14) | def _get_prompt(obj): class QuestionAnsweringPipeline (line 18) | class QuestionAnsweringPipeline(BaseComponent): method run (line 60) | def run(self, text: str) -> LLMInterface: class IndexingPipeline (line 75) | class IndexingPipeline(VectorIndexing): method run (line 92) | def run(self, text: str) -> Document: