MCPcopy Create free account

hub / github.com/PromtEngineer/localGPT / functions

Functions452 in github.com/PromtEngineer/localGPT

↓ 65 callersMethodsend_json_response
Send a JSON (UTF-8) response with CORS headers. Safe against client disconnects.
backend/server.py:1059
↓ 33 callersFunctioncn
(...inputs: ClassValue[])
src/lib/utils.ts:4
↓ 31 callersFunctionprint_status
Print status with emoji
system_health_check.py:11
↓ 17 callersMethodrun
Synchronous helper. If *event_callback* is supplied, important milestones will be forwarded to that callable as event_callback(ph
rag_system/agent/loop.py:251
↓ 16 callersMethodget_user_input
Get user input with optional default value.
create_index_script.py:70
↓ 15 callersMethodsend_json_response
Utility to send a JSON response with CORS headers.
rag_system/api_server.py:734
↓ 14 callersMethodsend_json_response
Utility to send a JSON response with CORS headers.
rag_system/api_server_with_progress.py:404
↓ 12 callersMethodupdate
Update progress with number of items processed
rag_system/utils/batch_processor.py:33
↓ 11 callersFunctiondisplayName
(label: string)
src/components/ui/chat-settings-modal.tsx:131
↓ 10 callersMethodadd_message
Add a message to a session
backend/database.py:157
↓ 10 callersMethodgenerate_completion
Generates a completion, now with optional support for images. Args: model: The name of the generation model (e.g., 'llav
rag_system/utils/ollama_client.py:36
↓ 10 callersFunctiontimer
Context manager to time operations
rag_system/utils/batch_processor.py:12
↓ 8 callersMethodencode
Return one vector *per* span. Args: text: Full document text. chunk_spans: List of (char_start, char_end) offsets for
rag_system/indexing/latechunk.py:43
↓ 8 callersMethodget_index
(self, index_id: str)
backend/database.py:342
↓ 8 callersMethodget_table
(self, table_name: str)
rag_system/indexing/embedders.py:14
↓ 7 callersMethodget_indexes_for_session
(self, session_id: str)
backend/database.py:386
↓ 7 callersMethodget_session
Get a specific session
backend/database.py:141
↓ 7 callersFunctionnormalizeWhitespace
(text: string)
src/utils/textNormalization.ts:6
↓ 7 callersFunctionprint_section
Print a formatted section header.
rag_system/utils/validate_model_config.py:33
↓ 7 callersMethodupdate
Update progress and send notification
rag_system/api_server_with_progress.py:89
↓ 7 callersMethodupdate_index_metadata
Merge new key/values into an index's metadata JSON column.
backend/database.py:428
↓ 6 callersMethodis_ollama_running
Check if Ollama server is running
backend/ollama_client.py:13
↓ 5 callersMethod_token_len
Get token count for text using the tokenizer.
rag_system/ingestion/chunking.py:29
↓ 5 callersMethodcreateMessage
( content: string, sender: 'user' | 'assistant', isLoading = false )
src/lib/api.ts:407
↓ 5 callersMethodcreate_embeddings
(self, texts: List[str])
rag_system/indexing/representations.py:45
↓ 5 callersMethodindex
(self, table_name: str, chunks: List[Dict[str, Any]], embeddings: np.ndarray)
rag_system/indexing/embedders.py:30
↓ 5 callersMethodlist_models
Get list of available models
backend/ollama_client.py:21
↓ 5 callersFunctionprint_header
Print a formatted header.
rag_system/utils/validate_model_config.py:27
↓ 5 callersMethodsend_event
Send an SSE event to a specific session
rag_system/api_server_with_progress.py:48
↓ 4 callersFunction_apply_index_embedding_model
Ensure retrieval pipeline uses the embedding model stored with the first index.
rag_system/api_server.py:42
↓ 4 callersMethod_command_exists
Check if a command exists in PATH.
run_system.py:213
↓ 4 callersMethodadd_document_to_index
(self, index_id: str, filename: str, stored_path: str)
backend/database.py:374
↓ 4 callersMethodchat
Send a chat message to Ollama
backend/ollama_client.py:57
↓ 4 callersMethodcreateSession
(title: string = 'New Chat', model: string = 'llama3.2:latest')
src/lib/api.ts:148
↓ 4 callersMethodcreate_index
(self, name: str, description: str|None = None, metadata: dict | None = None)
backend/database.py:328
↓ 4 callersMethodformat
(self, record)
run_system.py:71
↓ 4 callersMethodgenerate
(self, query: str)
rag_system/retrieval/query_transformer.py:299
↓ 4 callersFunctionget_agent
Factory function to get an instance of the RAG agent based on the specified mode. Args: mode: Configuration mode ("default", "fa
rag_system/main.py:167
↓ 4 callersMethodretrieve
(self, query: str, k: int = 5, score_cutoff: int = 80)
rag_system/retrieval/retrievers.py:31
↓ 4 callersMethodupdate_session_title
Update session title
backend/database.py:219
↓ 3 callersMethod_get_db_manager
(self)
rag_system/pipelines/retrieval_pipeline.py:66
↓ 3 callersFunction_get_table_name_for_session
Get the correct vector table name for a session by looking up its linked indexes.
rag_system/api_server.py:71
↓ 3 callersMethod_get_text_embedder
(self)
rag_system/pipelines/retrieval_pipeline.py:75
↓ 3 callersMethod_image_to_base64
Converts a Pillow Image to a base64 string.
rag_system/utils/ollama_client.py:18
↓ 3 callersMethod_send_progress_update
Send progress update via Server-Sent Events
rag_system/api_server_with_progress.py:132
↓ 3 callersMethodchunk
(self, text: str, document_id: str, document_metadata: Dict[str, Any] | None = None)
rag_system/ingestion/docling_chunker.py:249
↓ 3 callersFunctionestimate_memory_usage
Estimate memory usage of chunks in MB
rag_system/utils/batch_processor.py:199
↓ 3 callersMethodfinish
Report final statistics
rag_system/utils/batch_processor.py:59
↓ 3 callersFunctiongenerateUUID
()
src/lib/api.ts:4
↓ 3 callersFunctiongenerate_session_title
Generate a session title from the first message
backend/database.py:639
↓ 3 callersMethodgetModels
()
src/lib/api.ts:422
↓ 3 callersMethodgetSession
(sessionId: string)
src/lib/api.ts:170
↓ 3 callersMethodgetSessionIndexes
(sessionId: string)
src/lib/api.ts:529
↓ 3 callersMethodget_messages
Get all messages for a session
backend/database.py:184
↓ 3 callersMethodis_port_in_use
Check if a port is already in use.
run_system.py:174
↓ 3 callersMethodprocess_in_batches
Process items in batches with progress tracking Args: items: List of items to process process_func:
rag_system/utils/batch_processor.py:76
↓ 3 callersMethodstart_service
Start a single service.
run_system.py:248
↓ 3 callersMethodstream_completion
Generator that yields partial *response* strings as they arrive. Example: for tok in client.stream_completion("qwen2", "Hello"):
rag_system/utils/ollama_client.py:121
↓ 3 callersFunctionvalidate_model_config
Validates the model configuration for consistency and availability. Raises: ValueError: If configuration conflicts are detected
rag_system/main.py:211
↓ 2 callersMethod_format_query_with_history
Formats the user query with conversation history for context.
rag_system/agent/loop.py:152
↓ 2 callersMethod_generate_summary
Generates a contextual summary using a structured, multi-part prompt.
rag_system/indexing/contextualizer.py:39
↓ 2 callersMethod_get_dense_retriever
Ensure a dense MultiVectorRetriever is always available unless explicitly disabled.
rag_system/pipelines/retrieval_pipeline.py:84
↓ 2 callersMethod_load_overviews
Helper to load overviews from a .jsonl file into self.doc_overviews.
rag_system/agent/loop.py:55
↓ 2 callersMethod_perform_conversion
Perform the actual conversion using the specified converter.
rag_system/ingestion/document_converter.py:118
↓ 2 callersMethod_print_status_summary
Print system status summary.
run_system.py:406
↓ 2 callersMethod_simple_pattern_routing
📝 FALLBACK: Simple pattern-based routing (original logic).
backend/server.py:506
↓ 2 callersMethod_synthesize_final_answer
Uses a text LLM to synthesize a final answer from extracted facts.
rag_system/pipelines/retrieval_pipeline.py:219
↓ 2 callersMethod_token_len
(self, text: str)
rag_system/ingestion/docling_chunker.py:40
↓ 2 callersMethodcleanup_empty_sessions
Remove sessions with no messages
backend/database.py:243
↓ 2 callersMethodconvertDbMessage
(dbMessage: Record<string, unknown>)
src/lib/api.ts:396
↓ 2 callersFunctioncreate_contextual_window
(all_chunks: List[Dict[str, Any]], chunk_index: int, window_size: int = 1)
rag_system/ingestion/chunking.py:128
↓ 2 callersMethodcreate_session
Create a new chat session
backend/database.py:108
↓ 2 callersFunctioncurrentCleanup
(text)
test_markdown_streaming.js:45
↓ 2 callersMethodensure_models
Ensure required Ollama models are available.
run_system.py:222
↓ 2 callersMethodget_documents_for_session
Retrieves all document file paths for a given session.
backend/database.py:315
↓ 2 callersMethodget_sessions
Get all chat sessions, ordered by most recent
backend/database.py:124
↓ 2 callersMethodget_stats
Get database statistics
backend/database.py:272
↓ 2 callersFunctionhandleSessionSelect
(sessionId: string)
src/components/demo.tsx:43
↓ 2 callersFunctionimprovedCleanup
(text)
test_markdown_streaming.js:49
↓ 2 callersMethodlinkIndexToSession
(sessionId: string, indexId: string)
src/lib/api.ts:512
↓ 2 callersMethodload_overviews_for_indexes
Aggregate overviews for the given indexes or fall back to global file.
rag_system/agent/loop.py:74
↓ 2 callersMethodmonitor
Monitor running services and restart if needed.
run_system.py:469
↓ 2 callersFunctionnormalizeStreamingToken
(currentText: string, newToken: string)
src/utils/textNormalization.ts:30
↓ 2 callersMethodremove_connection
Remove an SSE connection
rag_system/api_server_with_progress.py:41
↓ 2 callersMethodrerank
Reranks a list of documents based on their relevance to a query. If *early_exit* is True the cross-encoder scores documents in mini-
rag_system/rerankers/reranker.py:30
↓ 2 callersFunctionrun_indexing
Runs the indexing pipeline for the specified documents.
rag_system/main.py:242
↓ 2 callersFunctionselect_embedder
Return appropriate EmbeddingModel implementation for the given name.
rag_system/indexing/representations.py:145
↓ 2 callersMethodshutdown
Gracefully shutdown all services.
run_system.py:428
↓ 2 callersMethodsplit_markdown
Split one Markdown doc into chunks with max_tokens limit.
rag_system/ingestion/docling_chunker.py:47
↓ 2 callersFunctionstart_server
Starts the API server.
rag_system/api_server.py:743
↓ 2 callersFunctiontruncate
(str: string, n: number = 18)
src/components/ui/session-chat.tsx:32
↓ 1 callersMethod_convert_general_to_markdown
Convert non-PDF formats using general converter.
rag_system/ingestion/document_converter.py:113
↓ 1 callersMethod_convert_pdf_to_markdown
Convert PDF with OCR detection logic.
rag_system/ingestion/document_converter.py:77
↓ 1 callersMethod_convert_txt_to_markdown
Convert plain text files to markdown by reading content directly.
rag_system/ingestion/document_converter.py:97
↓ 1 callersMethod_cosine_similarity
Computes cosine similarity between two vectors.
rag_system/agent/loop.py:104
↓ 1 callersMethod_embed_single
(self, text: str)
rag_system/indexing/representations.py:113
↓ 1 callersMethod_embed_single
(q: str)
rag_system/retrieval/retrievers.py:67
↓ 1 callersMethod_ensure_model
Lazily download and load the Provence model exactly once.
rag_system/rerankers/sentence_pruner.py:33
↓ 1 callersMethod_find_in_semantic_cache
Finds a semantically similar query in the cache.
rag_system/agent/loop.py:125
↓ 1 callersMethod_generate_translation_prompt
(self, query: str)
rag_system/retrieval/query_transformer.py:309
next →1–100 of 452, ranked by callers