MCPcopy Index your code

hub / github.com/lfnovo/open-notebook / functions

Functions1,250 in github.com/lfnovo/open-notebook

↓ 541 callersMethodget
(cls: Type[T], id: str)
open_notebook/domain/base.py:103
↓ 125 callersFunctionuseTranslation
()
frontend/src/lib/hooks/use-translation.ts:9
↓ 112 callersFunctioncn
(...inputs: ClassValue[])
frontend/src/lib/utils.ts:4
↓ 88 callersFunctionrepo_query
Execute a SurrealQL query and return the results
open_notebook/database/repository.py:65
↓ 67 callersFunctionensure_record_id
Ensure a value is a RecordID.
open_notebook/database/repository.py:40
↓ 53 callersMethod_make_request
Make HTTP request to the API.
api/client.py:48
↓ 52 callersMethoddelete
Delete source and clean up associated file, embeddings, and insights.
open_notebook/domain/notebook.py:582
↓ 43 callersFunctionuseToast
()
frontend/src/lib/hooks/use-toast.ts:10
↓ 38 callersMethodsave
Save the note and submit embedding command. Overrides ObjectModel.save() to submit an async embed_note command after saving,
open_notebook/domain/notebook.py:636
↓ 32 callersFunctionvalidate_url
Validate URL format for API endpoints. This is a self-hosted application, so we allow: - Private IPs (10.x, 172.16-31.x, 192.168.x) for
api/credentials_service.py:92
↓ 31 callersFunctiongetApiErrorKey
(errorOrMessage: unknown, fallbackKey?: string)
frontend/src/lib/utils/error-handler.ts:34
↓ 30 callersMethodfrom_file
Create migration from SQL file.
open_notebook/database/async_migrate.py:23
↓ 26 callersFunctionsrc
(id: string, insights_count = 0)
frontend/src/lib/utils/source-context.test.ts:11
↓ 24 callersFunctiongetApiErrorMessage
( errorOrMessage: unknown, t: (key: string) => string, fallbackKey?: string )
frontend/src/lib/utils/error-handler.ts:59
↓ 22 callersFunctiondetect_content_type_from_extension
Detect content type from file extension. Args: file_path: Path to the file (can be full path or just filename) Returns:
open_notebook/utils/chunking.py:173
↓ 21 callersFunctionclassify_model_type
Classify a model into a type based on its name and provider. Returns one of: language, embedding, speech_to_text, text_to_speech
open_notebook/ai/model_discovery.py:157
↓ 17 callersFunctiontoken_count
Count the number of tokens in the input string using the 'o200k_base' encoding. Args: input_string (str): The input string to count
open_notebook/utils/token_utils.py:15
↓ 16 callersFunctionchunk_text
Split text into chunks using appropriate splitter for content type. Args: text: The text to chunk content_type: Optional exp
open_notebook/utils/chunking.py:418
↓ 15 callersMethodget_context
( self, context_size: Literal["short", "long"] = "short" )
open_notebook/domain/notebook.py:666
↓ 15 callersMethodupdate
(self)
open_notebook/domain/base.py:323
↓ 13 callersMethodget
Override get() to handle api_key decryption.
open_notebook/domain/credential.py:156
↓ 12 callersFunctionget_command_id
Extract command_id from input_data's execution context, or return 'unknown'.
commands/embedding_commands.py:27
↓ 10 callersFunctionclassify_error
Classify a raw exception into a user-friendly error type and message. Args: exception: Any exception from LLM providers/Esperanto/La
open_notebook/utils/error_classifier.py:72
↓ 10 callersFunctioncompare_versions
Compare two semantic versions. Args: version1 (str): First version string version2 (str): Second version string Returns
open_notebook/utils/version_utils.py:132
↓ 10 callersFunctiongenerate_embeddings
Generate embeddings for multiple texts with automatic batching and retry. Texts are split into batches of EMBEDDING_BATCH_SIZE to avoid exce
open_notebook/utils/embedding.py:111
↓ 10 callersMethodsearch
Search the knowledge base.
api/client.py:117
↓ 10 callersFunctionuseModalManager
()
frontend/src/lib/hooks/use-modal-manager.ts:7
↓ 9 callersFunction_cors_headers
Build CORS headers for error responses. Mirrors Starlette CORSMiddleware behavior: reflects the request Origin when the origin is allowe
api/main.py:67
↓ 9 callersFunctioncomputeSourceSelections
( existing: Record<string, ContextMode>, sources: SourceLike[], defaultMode: SourceContextDefault = 'inc
frontend/src/lib/utils/source-context.ts:56
↓ 9 callersFunctiondetect_content_type_from_heuristics
Detect content type using content heuristics. Args: text: The text content to analyze Returns: Tuple of (ContentType, c
open_notebook/utils/chunking.py:195
↓ 9 callersFunctiongenerate_embedding
Generate a single embedding for text, handling large content via chunking and mean pooling. For short text (<= CHUNK_SIZE tokens): -
open_notebook/utils/embedding.py:209
↓ 9 callersMethodget
(self, url, headers=None, timeout=None)
tests/test_credentials_api.py:118
↓ 9 callersFunctiongetApiUrl
()
frontend/src/lib/config.ts:22
↓ 9 callersMethodget_all
(cls: Type[T], order_by=None)
open_notebook/domain/base.py:39
↓ 9 callersMethodget_by_provider
Get all credentials for a provider.
open_notebook/domain/credential.py:140
↓ 9 callersFunctionprovision_langchain_model
Returns the best model to use based on the context size and on whether there is a specific model being requested in Config. If context > 105_
open_notebook/ai/provision.py:10
↓ 9 callersFunctionprovision_provider_keys
Provision environment variables from database for a specific provider. This function checks if the provider has a Credential record stored i
open_notebook/ai/key_provider.py:246
↓ 9 callersMethodrun
Run the migration.
open_notebook/database/async_migrate.py:36
↓ 8 callersFunctionbuild_episode_output_dir
Build a filesystem-safe output directory path for a podcast episode. Uses a UUID as the directory name so the path is safe regardless of what
commands/podcast_commands.py:26
↓ 8 callersFunctionclean_thinking_content
Remove thinking content from AI responses, returning only the cleaned content. This is a convenience function for cases where you only need
open_notebook/utils/text_utils.py:100
↓ 8 callersFunctiongetDateLocale
(language: string)
frontend/src/lib/utils/date-locale.ts:30
↓ 8 callersMethodget_instance
Get or create the singleton instance and load from DB
open_notebook/domain/base.py:308
↓ 8 callersFunctionnote
(id: string)
frontend/src/lib/utils/source-context.test.ts:12
↓ 8 callersFunctionparse_thinking_content
Parse message content to extract thinking content from <think> tags. Handles both well-formed tags and malformed output where the opening
open_notebook/utils/text_utils.py:42
↓ 8 callersMethodto_esperanto_config
Build config dict for AIFactory.create_*() calls. Returns a dict that can be passed as the 'config' parameter to Esperanto's
open_notebook/domain/credential.py:102
↓ 7 callersFunction_resolve_model_config
Load Model record, resolve credential -> (provider, model_name, config_dict). Used by resolve_outline_config, resolve_transcript_config, resolve_
open_notebook/podcasts/models.py:11
↓ 7 callersFunctionbulkModeForSource
( mode: SourceContextDefault, insightsCount: number, )
frontend/src/lib/utils/source-context.ts:29
↓ 7 callersFunctiondetect_content_type
Detect content type using file extension (primary) and heuristics (fallback). Strategy: 1. If file extension is available and recognized
open_notebook/utils/chunking.py:322
↓ 7 callersFunctionextract_text_content
Extract text from LLM response content. Handles both plain string responses and structured content formats (e.g. Gemini's envelope format):
open_notebook/utils/text_utils.py:122
↓ 7 callersFunctionget_secret_from_env
Get a secret from environment, supporting Docker secrets pattern. Checks for VAR_FILE first (Docker secrets), then falls back to VAR. A
open_notebook/utils/encryption.py:29
↓ 7 callersFunctionmean_pool_embeddings
Combine multiple embeddings into a single embedding using mean pooling. Algorithm: 1. Normalize each embedding to unit length 2. Com
open_notebook/utils/embedding.py:55
↓ 7 callersMethodrender
()
frontend/src/components/common/ErrorBoundary.tsx:48
↓ 7 callersFunctionuseModels
()
frontend/src/lib/hooks/use-models.ts:16
↓ 7 callersFunctionuseNotebooks
(archived?: boolean)
frontend/src/lib/hooks/use-notebooks.ts:9
↓ 6 callersFunction_build_text_exceeding_tokens
Build text that exceeds a token threshold.
tests/test_chunking.py:31
↓ 6 callersFunction_check_provider_has_credential
Check if a provider has any credentials configured in the database.
api/routers/models.py:115
↓ 6 callersFunction_handle_value_error
Convert a ValueError from the service layer to an HTTPException.
api/routers/credentials.py:63
↓ 6 callersMethod_prepare_save_data
Override to encrypt api_key and sync provider extras into `config`.
open_notebook/domain/credential.py:227
↓ 6 callersFunctionapplyBulkSourceContext
( existing: Record<string, ContextMode>, sources: SourceLike[], action: SourceContextDefault, )
frontend/src/lib/utils/source-context.ts:77
↓ 6 callersFunctionfull_model_dump
(model)
commands/podcast_commands.py:40
↓ 6 callersMethodget_by_name
Get episode profile by name
open_notebook/podcasts/models.py:116
↓ 6 callersMethodget_embedding_model
Get the default embedding model
open_notebook/ai/models.py:209
↓ 6 callersFunctionget_latest_version
Get the latest version from the migrations table.
open_notebook/database/async_migrate.py:204
↓ 6 callersMethodget_model
Get a model by ID. Esperanto will cache the actual model instance.
open_notebook/ai/models.py:102
↓ 6 callersMethodvectorize
Submit vectorization as a background job using the embed_source command. This method leverages the job-based architecture to prevent
open_notebook/domain/notebook.py:477
↓ 5 callersFunction_assert_chunks_within_token_limit
Assert chunks stay within the configured token window.
tests/test_chunking.py:39
↓ 5 callersFunction_check_azure_support
Check if Azure OpenAI provider is available for a specific mode. Args: mode: One of 'LLM', 'EMBEDDING', 'STT', 'TTS' Returns:
api/routers/models.py:125
↓ 5 callersFunction_check_openai_compatible_support
Check if OpenAI-compatible provider is available for a specific mode. Args: mode: One of 'LLM', 'EMBEDDING', 'STT', 'TTS' Retur
api/routers/models.py:152
↓ 5 callersFunction_get_default_credential
Get the first credential for a provider from the database.
open_notebook/ai/key_provider.py:76
↓ 5 callersFunction_profile_to_response
(profile: SpeakerProfile)
api/routers/speaker_profiles.py:23
↓ 5 callersFunction_profile_to_response
(profile: EpisodeProfile)
api/routers/episode_profiles.py:29
↓ 5 callersFunction_resolve_audio_path
(audio_file: str)
api/routers/podcasts.py:34
↓ 5 callersFunctioncredential_to_response
Convert a Credential domain object to API response.
api/credentials_service.py:208
↓ 5 callersFunctiondb_connection
()
open_notebook/database/repository.py:48
↓ 5 callersMethodget_current_version
Get current database version.
open_notebook/database/async_migrate.py:177
↓ 5 callersMethodget_defaults
Get the default models configuration from database
open_notebook/ai/models.py:178
↓ 5 callersMethodget_linked_models
Get all models linked to this credential.
open_notebook/domain/credential.py:215
↓ 5 callersFunctionopenModal
(type: ModalType, id: string)
frontend/src/lib/hooks/use-modal-manager.ts:21
↓ 5 callersMethodrelate
( self, relationship: str, target_id: str, data: Optional[Dict] = {} )
open_notebook/domain/base.py:217
↓ 5 callersMethodsubmit_command_job
Submit a generic command job for background processing
api/command_service.py:11
↓ 4 callersFunction_get_size_metrics
()
open_notebook/utils/embedding.py:149
↓ 4 callersMethodbuild
Build context based on provided parameters. Returns: Dict containing the built context with metadata
open_notebook/utils/context_builder.py:105
↓ 4 callersFunctioncomputeNoteSelections
( existing: Record<string, ContextMode>, notes: NoteLike[], defaultAction: NoteContextDefault = 'include
frontend/src/lib/utils/source-context.ts:112
↓ 4 callersFunctiondecrypt_value
Decrypt a Fernet-encrypted string value. Handles graceful fallback for legacy unencrypted data. Args: value: The encrypted stri
open_notebook/utils/encryption.py:167
↓ 4 callersFunctiongetConfig
()
frontend/src/lib/config.ts:43
↓ 4 callersMethodget_context
Build long-form notebook context for podcast and LLM workflows. Normal list retrieval omits large source/note bodies, so this method
open_notebook/domain/notebook.py:69
↓ 4 callersMethodget_embedded_chunks
(self)
open_notebook/domain/notebook.py:442
↓ 4 callersMethodget_episode
Get a specific podcast episode
api/podcast_service.py:153
↓ 4 callersMethodget_insights
(self)
open_notebook/domain/notebook.py:458
↓ 4 callersMethodget_notes
Get all notes with optional notebook filtering.
api/client.py:251
↓ 4 callersFunctionget_session_message_count
Get message count from LangGraph state, returns 0 on error.
open_notebook/utils/graph_utils.py:7
↓ 4 callersFunctionhandleChange
(key: keyof ModelDefaults, value: string)
frontend/src/app/(dashboard)/settings/api-keys/page.tsx:1149
↓ 4 callersFunctionhandleContextModeChange
(itemId: string, mode: ContextMode, type: 'source' | 'note')
frontend/src/app/(dashboard)/notebooks/[id]/page.tsx:96
↓ 4 callersFunctionhandleSubmit
(e: React.FormEvent)
frontend/src/components/auth/LoginForm.tsx:128
↓ 4 callersFunctionparse_record_ids
Recursively parse and convert RecordIDs into strings.
open_notebook/database/repository.py:29
↓ 4 callersFunctionrequire_encryption_key
Raise ValueError if encryption key is not configured.
api/credentials_service.py:199
↓ 4 callersFunctionsave_source
(state: SourceState)
open_notebook/graphs/source.py:110
↓ 4 callersFunctionscrollToSelectedRow
(index: number)
frontend/src/app/(dashboard)/sources/page.tsx:147
↓ 4 callersFunctiontoggleSection
(section: string)
frontend/src/app/(dashboard)/settings/components/SettingsForm.tsx:56
↓ 3 callersMethod_add_source_context
Add source and its insights to context. Args: source_id: ID of the source inclusion_level: "insights", "full
open_notebook/utils/context_builder.py:142
next →1–100 of 1,250, ranked by callers