MCPcopy Create free account

hub / github.com/bernatsampera/event-deep-research / functions

Functions76 in github.com/bernatsampera/event-deep-research

↓ 4 callersFunctioncreate_llm_structured_model
Creates a general-purpose chat model with no tools.
src/llm_service.py:55
↓ 4 callersMethodfrom_runnable_config
Create a Configuration instance from a RunnableConfig.
src/configuration.py:89
↓ 4 callersFunctionget_langfuse_handler
()
src/utils.py:86
↓ 3 callersFunction_build_and_configure_model
Internal helper to apply retry and runtime configuration.
src/llm_service.py:16
↓ 2 callersFunctioncreate_biographic_event_graph
Create and return the biographic event detection graph.
src/research_events/chunk_graph.py:75
↓ 2 callersFunctioncreate_llm_with_tools
Creates a model configured specifically for tool-calling.
src/llm_service.py:36
↓ 2 callersFunctionensure_categories_with_events
Specifically converts data to CategoriesWithEvents model.
src/research_events/merge_events/utils.py:41
↓ 2 callersMethodextract_domain
Extract domain from URL.
src/services/url_service.py:7
↓ 1 callersFunctionchunk_text_by_tokens
Splits text into token-based, overlapping chunks.
src/url_crawler/utils.py:72
↓ 1 callersFunctioncreate_llm_chunk_model
Creates a small model for chunk biographical event detection.
src/llm_service.py:77
↓ 1 callersFunctionensure_pydantic_model
Converts a dictionary to a Pydantic model instance if needed. If the data is already an instance of the model class, returns it as-is. Args:
src/research_events/merge_events/utils.py:9
↓ 1 callersFunctiongeocode_location
(location_name: str)
scripts/geocode.py:14
↓ 1 callersFunctionget_api_key_for_model
Get API key for a specific model from environment or config.
src/utils.py:37
↓ 1 callersFunctionget_buffer_string_with_tools
Return a readable transcript showing roles, including tool names for ToolMessages.
src/utils.py:54
↓ 1 callersMethodget_llm_chunk_model
Get the LLM chunk model, using overrides if provided.
src/configuration.py:82
↓ 1 callersMethodget_llm_structured_model
Get the LLM structured model, using overrides if provided.
src/configuration.py:66
↓ 1 callersMethodget_llm_with_tools_model
Get the LLM with tools model, using overrides if provided.
src/configuration.py:74
↓ 1 callersFunctionmain
()
scripts/geocode.py:31
↓ 1 callersMethodmerge_categorized_events
Merge multiple categorized event results into one.
src/services/event_service.py:15
↓ 1 callersFunctionmock_merge_events
Provide a reusable mock for merge_events_app with configurable responses.
src/test/test_research_events.py:71
↓ 1 callersFunctionmock_structured_llm
Provide a reusable mock for model_for_structured with configurable responses.
src/test/test_merge_events.py:41
↓ 1 callersFunctionmock_url_crawler
Provide a reusable mock for url_crawler_app with configurable responses.
src/test/test_research_events.py:55
↓ 1 callersFunctionremove_markdown_links
Removes Markdown links, keeping only display text.
src/url_crawler/utils.py:55
↓ 1 callersFunctionscrape_page_content
Scrapes URL using Firecrawl API and returns Markdown content.
src/url_crawler/utils.py:26
↓ 1 callersFunctionupdateUrlList
( state: ResearchEventsState, )
src/research_events/research_events_graph.py:105
↓ 1 callersMethodupdate_url_list
Remove first URL from list and track its domain.
src/services/url_service.py:12
↓ 1 callersFunctionurl_crawl
Crawls a URL and returns its content. For this example, returns dummy text.
src/url_crawler/utils.py:14
Method__getitem__
Make the mock tool call subscriptable.
src/test/test_enhanced_merge_events.py:33
Method__init__
(self, message: str, node: str, state: dict)
src/core/error_handling.py:8
Method__init__
Initialize mock tool call with name and args.
src/test/test_enhanced_merge_events.py:28
Method__init__
Initialize mock tool response with tool calls.
src/test/test_enhanced_merge_events.py:46
Method__init__
Initialize mock response with content.
src/test/test_merge_events.py:35
Method__init__
Initialize mock response with content.
src/test/test_research_events.py:32
Method__init__
Initialize mock tool call with name and args.
src/test/test_research_events.py:40
Method__init__
Initialize mock tool response with tool calls.
src/test/test_research_events.py:49
Functioncheck_chunk_for_events
Check each chunk for biographical events using structured output.
src/research_events/chunk_graph.py:37
Functioncombine_new_and_original_events
Merge original and new events for each category using an LLM.
src/research_events/merge_events/merge_events_graph.py:185
Functioncount_tokens
Counts the total tokens in a list of messages.
src/url_crawler/utils.py:103
Functioncrawl_url
Crawls the next URL and updates the temporary state with new events.
src/research_events/research_events_graph.py:140
Functioncreate_mock_crawler
Create a configured mock crawler.
src/test/test_research_events.py:58
Functioncreate_mock_merger
Create a configured mock merger.
src/test/test_research_events.py:74
Functioncreate_mock_model
Create a configured mock model.
src/test/test_merge_events.py:44
Functionextract_and_categorize_chunk
Combined extraction and categorization
src/research_events/merge_events/merge_events_graph.py:126
Functionfilter_chunks
Filter chunks to only process those containing biographical events
src/research_events/merge_events/merge_events_graph.py:82
Functionget_tokenizer
Get the tiktoken tokenizer, loading it lazily.
src/url_crawler/utils.py:64
Functionmerge_categorizations
Merge all categorized chunks into a single CategoriesWithEvents
src/research_events/merge_events/merge_events_graph.py:171
Functionmerge_events_and_update
Merges new events, removes the processed URL, and loops back to the router.
src/research_events/research_events_graph.py:163
Functionmock_ainvoke
(prompt)
src/test/test_merge_events.py:54
Functionmock_scraped_content
Provide mock scraped content for testing.
src/test/test_url_crawler.py:23
Functionoverride_reducer
Reducer function that allows a new value to completely replace the old one.
src/state.py:105
Functionsample_input_state
Provide a sample input state for the url_crawler_app graph.
src/test/test_url_crawler.py:14
Functionsample_input_state
Provide a sample input state for the merge_events_app graph.
src/test/test_merge_events.py:19
Functionsample_input_state
Provide a sample input state for the research_events_app graph.
src/test/test_research_events.py:15
Functionsample_merge_input_state
Provide a sample input state for the enhanced merge events graph.
src/test/test_enhanced_merge_events.py:11
Functionscrape_content
Scrapes URL content and returns it without any processing.
src/url_crawler/url_krawler_graph.py:28
Functionshould_process_url_router
( state: ResearchEventsState, )
src/research_events/research_events_graph.py:114
Functionsplit_events
Use token-based chunking from URL crawler and filter for biographical events
src/research_events/merge_events/merge_events_graph.py:61
Methodsplit_events_into_chunks
Split events text into chunks of specified length.
src/services/event_service.py:7
Functionsplit_text
Split text into smaller chunks.
src/research_events/chunk_graph.py:29
Functionstructure_events
Step 2: Structures the cleaned events into JSON format. Args: state: Current researcher state with cleaned events text. config: R
src/graph.py:166
Functionsupervisor_node
The 'brain' of the agent. It decides the next action.
src/graph.py:43
Functionsupervisor_tools_node
The 'hands' of the agent. Executes tools and returns a Command for routing.
src/graph.py:84
Functiontest_enhanced_merge_events_with_empty_content
Test enhanced merge events with empty extracted content.
src/test/test_enhanced_merge_events.py:84
Functiontest_enhanced_merge_events_with_mocked_llm
Unit test for the enhanced merge events graph with mocked dependencies.
src/test/test_enhanced_merge_events.py:52
Functiontest_merge_events_with_mocked_llm
Unit test for the merge events graph with a mocked LLM.
src/test/test_merge_events.py:67
Functiontest_merge_events_with_real_llm
Integration test for the merge events graph with real LLM calls.
src/test/test_merge_events.py:118
Functiontest_research_events_with_mocked_llm
Unit test for the research events graph with mocked dependencies.
src/test/test_research_events.py:85
Functiontest_research_events_with_real_llm
Integration test for the research events graph with real LLM calls.
src/test/test_research_events.py:151
Functiontest_url_crawler_with_empty_content
Test URL crawler with empty scraped content.
src/test/test_url_crawler.py:95
Functiontest_url_crawler_with_long_content
Test URL crawler with content longer than MAX_CONTENT_LENGTH.
src/test/test_url_crawler.py:118
Functiontest_url_crawler_with_mocked_llm
Unit test for the simplified URL crawler graph.
src/test/test_url_crawler.py:39
Functiontest_url_crawler_with_mocked_url_crawling
Test URL crawler with mocked URL crawling.
src/test/test_url_crawler.py:67
Functionthink_tool
Mandatory reflection step. Use this to analyze the last result, identify gaps, and formulate the EXACT query for the next search. You MUST use th
src/utils.py:17
Functionurl_finder
Find the urls for the research_question
src/research_events/research_events_graph.py:38
Functionwith_error_handling
(func)
src/core/error_handling.py:15
Functionwrapper
(state: Dict[str, Any], config)
src/core/error_handling.py:17