Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Azure-Samples/azure-search-openai-demo
/ functions
Functions
1,440 in github.com/Azure-Samples/azure-search-openai-demo
⨍
Functions
1,440
◇
Types & classes
211
↳
Endpoints
22
↓ 144 callers
Method
get
(self)
tests/mocks.py:648
↓ 28 callers
Method
split_pages
Split each page into semantic chunks using token-aware accumulation with atomic figures. Strategy (per page): 1. Extract balanced <fi
app/backend/prepdocslib/textsplitter.py:380
↓ 20 callers
Method
create_index
(self)
app/backend/prepdocslib/searchmanager.py:98
↓ 19 callers
Function
build_request
Construct an HttpRequest carrying the provided payload.
tests/test_function_apps.py:33
↓ 19 callers
Method
run
(self)
scripts/manageacl.py:69
↓ 18 callers
Method
json
(self)
tests/mocks.py:331
↓ 15 callers
Method
search
( self, top: int, query_text: Optional[str], filter: Optional[str], ve
app/backend/approaches/approach.py:287
↓ 14 callers
Function
create_authentication_helper
( enforce_access_control: bool = False, enable_unauthenticated_access: bool = False, )
tests/test_authenticationhelper.py:28
↓ 13 callers
Method
close
(self)
tests/mocks.py:126
↓ 13 callers
Function
write_run
Create a single run folder with summary.json, eval_results.jsonl, and evaluate_parameters.json.
evals/tests/test_review_utils.py:11
↓ 12 callers
Method
close
(self)
app/backend/prepdocslib/listfilestrategy.py:63
↓ 12 callers
Function
create_strategy
( use_acls: bool = False, sharepoint: SharePointSource | None = None )
tests/test_builtincloudingestionstrategy.py:42
↓ 12 callers
Function
fetchWithAuthRedirect
(input: RequestInfo | URL, init?: RequestInit)
app/frontend/src/api/api.ts:13
↓ 12 callers
Method
read
(self)
tests/mocks.py:615
↓ 11 callers
Function
setup_cloud_ingestion_strategy
Setup the cloud ingestion strategy with all required services.
app/backend/setup_cloud_ingestion.py:45
↓ 11 callers
Function
setup_openai_client
( openai_host: OpenAIHost, azure_credential: AsyncTokenCredential, azure_openai_api_key: Optional[
app/backend/prepdocslib/servicesetup.py:84
↓ 10 callers
Method
close_clients
(self)
app/backend/prepdocslib/blobmanager.py:438
↓ 10 callers
Method
filename
Get the filename from the content object. Different file-like objects store the filename in different attributes: - File obj
app/backend/prepdocslib/listfilestrategy.py:25
↓ 10 callers
Function
send_question_to_target
( question: str, url: str, parameters: dict | None = None, raise_error=False, response_ans
evals/evaltools/eval/evaluate.py:23
↓ 10 callers
Method
upload_blob
(self, file: File)
app/backend/prepdocslib/blobmanager.py:446
↓ 9 callers
Function
getHeaders
(idToken: string | undefined)
app/frontend/src/api/api.ts:25
↓ 9 callers
Method
get_media_describer
Return (and lazily create) the media describer for this processor.
app/backend/prepdocslib/figureprocessor.py:57
↓ 9 callers
Function
mock_openai_chatcompletion
(monkeypatch)
tests/conftest.py:143
↓ 9 callers
Function
mock_openai_embedding
(monkeypatch)
tests/conftest.py:117
↓ 9 callers
Function
process_page_image
Generate description, upload image, and optionally compute embedding for a figure.
app/backend/prepdocslib/figureprocessor.py:126
↓ 9 callers
Function
setup_acl_mocks
Helper to set up mocks for get_file_acls tests.
tests/test_function_apps.py:720
↓ 8 callers
Function
build_file_processors
( *, azure_credential: AsyncTokenCredential, document_intelligence_service: str | None, docume
app/backend/prepdocslib/servicesetup.py:248
↓ 8 callers
Method
download_blob
(self)
tests/mocks.py:68
↓ 8 callers
Function
getToken
(client: IPublicClientApplication)
app/frontend/src/authConfig.ts:234
↓ 8 callers
Function
server_app_initial
(identifier: int)
scripts/auth_init.py:99
↓ 8 callers
Method
split_text_into_batches
(self, texts: list[str])
app/backend/prepdocslib/embeddings.py:74
↓ 7 callers
Method
by_page
(self)
tests/mocks.py:312
↓ 7 callers
Method
check_path_auth
(self, path: str, auth_claims: dict[str, Any], search_client: SearchClient)
app/backend/core/authentication.py:180
↓ 7 callers
Method
create_embeddings
(self, texts: list[str])
app/backend/prepdocslib/embeddings.py:173
↓ 7 callers
Function
error_response
(error: Exception, route: str, status_code: int = 500)
app/backend/error.py:43
↓ 7 callers
Method
get_aggregate_stats
Returns a dictionary of aggregate statistics for the metric
evals/evaltools/eval/evaluate_metrics/base_metric.py:14
↓ 7 callers
Method
parse
(self, content: IO)
app/backend/prepdocslib/csvparser.py:23
↓ 7 callers
Method
remove_blob
(self, path: Optional[str] = None)
app/backend/prepdocslib/blobmanager.py:549
↓ 7 callers
Method
run_agentic_retrieval
( self, messages: list[EasyInputMessageParam], knowledgebase_client: KnowledgeBaseRetr
app/backend/approaches/approach.py:428
↓ 7 callers
Function
setup_embeddings_service
( openai_host: OpenAIHost, open_ai_client: AsyncOpenAI, emb_model_name: str, emb_model_dimensi
app/backend/prepdocslib/servicesetup.py:157
↓ 7 callers
Method
text
(self)
tests/mocks.py:328
↓ 7 callers
Method
update_content
(self, sections: list[Section], url: Optional[str] = None)
app/backend/prepdocslib/searchmanager.py:597
↓ 6 callers
Method
add
(self, text: str, token_count: int)
app/backend/prepdocslib/textsplitter.py:161
↓ 6 callers
Method
build_data_source
(self)
app/backend/prepdocslib/builtincloudingestionstrategy.py:280
↓ 6 callers
Method
build_skillset
( self, name: str | None = None, source_fields: SourceFields = BLOB_SOURCE_FIELDS )
app/backend/prepdocslib/builtincloudingestionstrategy.py:176
↓ 6 callers
Method
create
(self, *args, **kwargs)
tests/mocks.py:343
↓ 6 callers
Method
create_analyzer
(self)
app/backend/prepdocslib/mediadescriber.py:127
↓ 6 callers
Function
create_or_update_application_with_secret
( graph_client: GraphServiceClient, app_id_env_var: str, app_secret_env_var: str, request_app: Application
scripts/auth_init.py:62
↓ 6 callers
Function
create_search_client
()
tests/test_authenticationhelper.py:44
↓ 6 callers
Method
extract_followup_questions
(self, content: Optional[str])
app/backend/approaches/chatreadretrieveread.py:102
↓ 6 callers
Method
get_file_client
(self, filename)
tests/mocks.py:662
↓ 6 callers
Method
get_sources_content
Extract text/image sources & citations from documents. Args: results: List of retrieved Document objects. use_semanti
app/backend/approaches/approach.py:714
↓ 6 callers
Method
parse
(self, content: IO)
app/backend/prepdocslib/pdfparser.py:65
↓ 6 callers
Method
remove_content
(self, path: Optional[str] = None, only_oid: Optional[str] = None)
app/backend/prepdocslib/searchmanager.py:649
↓ 6 callers
Method
split_page_by_max_tokens
Recursively split plain text by token count. Boundary preference order when an oversized span is encountered: 1. Sentence-ending punc
app/backend/prepdocslib/textsplitter.py:247
↓ 5 callers
Method
_ensure_directory
Ensures that a directory path exists and has proper permissions. Creates the entire path in a single operation if it doesn't exist.
app/backend/prepdocslib/blobmanager.py:166
↓ 5 callers
Function
create_mock_retrieve
Create a mock_retrieve function that returns different response types. Supported response_type values: - "default": single reference respon
tests/mocks.py:374
↓ 5 callers
Method
describe
Generate a description for the provided image bytes if a describer is available.
app/backend/prepdocslib/figureprocessor.py:100
↓ 5 callers
Function
diff_directories
(directories: list[Path], changed: str | None = None)
evals/evaltools/review/utils.py:82
↓ 5 callers
Method
from_skill_payload
(cls, data: dict[str, Any])
app/backend/prepdocslib/page.py:40
↓ 5 callers
Function
getAppServicesToken
()
app/frontend/src/authConfig.ts:140
↓ 5 callers
Method
get_token
(self, *scopes, **kwargs)
tests/mocks.py:49
↓ 5 callers
Function
grant_application_permissions
Grants admin consent for the app's Graph application permissions. Returns False if not allowed.
scripts/sharepoint_indexer_init.py:60
↓ 5 callers
Method
init
()
app/frontend/src/components/HistoryProviders/IndexedDB.ts:20
↓ 5 callers
Method
is_reasoning_model
Returns true if the model is a GPT-5 family reasoning model. This project no longer supports o-series models as they are rarely used now,
app/backend/approaches/approach.py:913
↓ 5 callers
Method
list
(self)
app/backend/prepdocslib/listfilestrategy.py:104
↓ 5 callers
Function
setup_blob_manager
Create a BlobManager instance for document or figure storage. The optional resource group and subscription are retained for parity with local
app/backend/prepdocslib/servicesetup.py:182
↓ 5 callers
Function
summarize_results
(results_dir)
evals/evaltools/review/utils.py:7
↓ 5 callers
Method
to_skill_payload
( self, file_name: str, *, include_bytes_base64: bool = True, )
app/backend/prepdocslib/page.py:20
↓ 5 callers
Method
validate_filename
Validate a literal leaf filename without changing the stored or indexed name.
app/backend/prepdocslib/blobmanager.py:152
↓ 4 callers
Function
build_group_summary
(label: str, run_paths: list[Path], iterations: int, seed: int)
evals/eval_compare.py:157
↓ 4 callers
Method
build_sharepoint_data_source
(self, sharepoint: SharePointSource)
app/backend/prepdocslib/builtincloudingestionstrategy.py:315
↓ 4 callers
Function
combine_text_with_figures
Replace figure placeholders in page text with full description markup.
app/backend/prepdocslib/textprocessor.py:14
↓ 4 callers
Method
create_search_indexer_client
(self)
app/backend/prepdocslib/strategy.py:47
↓ 4 callers
Method
filename_to_id
(self)
app/backend/prepdocslib/listfilestrategy.py:55
↓ 4 callers
Function
getActiveOrFirstAccount
(client: IPublicClientApplication)
app/frontend/src/authConfig.ts:10
↓ 4 callers
Method
get_auth_claims_if_enabled
(self, headers: dict)
app/backend/core/authentication.py:142
↓ 4 callers
Method
get_auth_setup_for_client
(self)
app/backend/core/authentication.py:77
↓ 4 callers
Method
get_documents
(self, search_client: SearchClient)
scripts/manageacl.py:145
↓ 4 callers
Function
get_graph_role_ids
Returns the Microsoft Graph service principal ID and the IDs of the required app roles.
scripts/sharepoint_indexer_init.py:44
↓ 4 callers
Function
grant_application_admin_consent
(graph_client: GraphServiceClient, client_app_id: str, server_app_id: str)
scripts/auth_init.py:209
↓ 4 callers
Method
parse
Parses the given content. To learn more, please visit https://pypi.org/project/beautifulsoup4/ Args: content (IO): The con
app/backend/prepdocslib/htmlparser.py:34
↓ 4 callers
Function
parse_file
( file: File, file_processors: dict[str, FileProcessor], category: Optional[str] = None, blob_
app/backend/prepdocslib/filestrategy.py:21
↓ 4 callers
Method
replace_all_ref_ids
Replace [ref_id:<id>] tokens with document sourcepage, web URL, or SharePoint web_url. Priority: web result -> SharePoint result -> document.
app/backend/approaches/approach.py:685
↓ 4 callers
Method
run
( self, messages: list[EasyInputMessageParam], session_state: Any = None, cont
app/backend/approaches/approach.py:1007
↓ 4 callers
Function
server_app_permission_setup
(server_app_id: str)
scripts/auth_init.py:106
↓ 4 callers
Function
setup_search_info
Setup search service information.
app/backend/prepdocslib/servicesetup.py:52
↓ 4 callers
Method
sourcepage_from_file_page
(cls, filename, page=0)
app/backend/prepdocslib/blobmanager.py:35
↓ 4 callers
Method
upload_document_image
( self, document_filename: str, image_bytes: bytes, image_filename: str,
app/backend/prepdocslib/blobmanager.py:464
↓ 4 callers
Function
validate_acl_configuration
Fails fast if the deployed data source or index can't ingest permissions. A misconfigured pipeline doesn't produce indexer errors: chunks are ind
app/backend/prepdocslib/builtincloudingestionstrategy.py:489
↓ 3 callers
Method
_select_knowledgebase_client
( self, use_web_source: bool, use_sharepoint_source: bool, )
app/backend/approaches/chatreadretrieveread.py:482
↓ 3 callers
Function
acl_index
(oids_filter=PermissionFilter.USER_IDS, path_fields=("metadata_storage_path",))
tests/test_builtincloudingestionstrategy.py:131
↓ 3 callers
Function
add_client_secret
(graph_client: GraphServiceClient, app_id: str)
scripts/auth_init.py:50
↓ 3 callers
Method
blob_name_from_file_name
(cls, filename)
app/backend/prepdocslib/blobmanager.py:42
↓ 3 callers
Method
build_indexer
(self)
app/backend/prepdocslib/builtincloudingestionstrategy.py:297
↓ 3 callers
Function
build_raw_request
Construct an HttpRequest with a raw (non-JSON) payload.
tests/test_function_apps.py:45
↓ 3 callers
Method
build_sharepoint_indexer
(self)
app/backend/prepdocslib/builtincloudingestionstrategy.py:337
↓ 3 callers
Function
checkLoggedIn
(client: IPublicClientApplication | undefined)
app/frontend/src/authConfig.ts:218
↓ 3 callers
Function
check_acl_ingestion
Warns if indexed chunks have no permissions, which means ACL ingestion silently didn't happen. Files without any named user or group ACL entries
app/backend/prepdocslib/builtincloudingestionstrategy.py:528
↓ 3 callers
Function
clean_key_if_exists
Remove leading and trailing whitespace from a key if it exists. If the key is empty, return None.
app/backend/prepdocslib/servicesetup.py:30
next →
1–100 of 1,440, ranked by callers