MCPcopy Create free account

hub / github.com/a-agmon/rs-graph-llm / functions

Functions194 in github.com/a-agmon/rs-graph-llm

↓ 52 callersMethodset
Set a value in the context. The value must be serializable. Most common Rust types are supported. # Examples ```rust use graph_flow::Context; use s
graph-flow/src/context.rs:491
↓ 48 callersMethodget
Get a value from the context. Returns `None` if the key doesn't exist or if deserialization fails. # Examples ```rust use graph_flow::Context; # #
graph-flow/src/context.rs:542
↓ 29 callersMethodadd_task
Add a task to the graph
graph-flow/src/graph.rs:65
↓ 24 callersMethodget_sync
Synchronous version of get for use in edge conditions. This method should only be used when you're certain the data exists and when async is not avai
graph-flow/src/context.rs:624
↓ 18 callersMethodsave
(&self, id: String, graph: Arc<Graph>)
graph-flow/src/storage.rs:72
↓ 16 callersMethodadd_edge
Add an edge between tasks
graph-flow/src/graph.rs:96
↓ 16 callersMethodadd_user_message
Add a user message to the chat history.
graph-flow/src/context.rs:265
↓ 15 callersMethodid
(&self)
examples/fanout_basic.rs:13
↓ 13 callersMethodadd_assistant_message
Add an assistant message to the chat history.
graph-flow/src/context.rs:270
↓ 13 callersMethodbuild
(self)
graph-flow/src/graph.rs:408
↓ 12 callersMethodid
(&self)
graph-flow/src/lib.rs:202
↓ 11 callersMethodis_empty
Check if the chat history is empty.
graph-flow/src/context.rs:301
↓ 9 callersMethodlen
Get the number of messages in the chat history.
graph-flow/src/context.rs:296
↓ 6 callersMethodget_rig_messages
Get all chat history messages converted to rig::completion::Message format. This method is only available when the "rig" feature is enabled. # Examp
graph-flow/src/context.rs:838
↓ 6 callersMethodhistory_read
Acquire the chat history read lock, recovering from poisoning. A poisoned lock means a task panicked while holding it; the history itself is still va
graph-flow/src/context.rs:440
↓ 6 callersFunctioninternal_error
(message: &str, details: &str)
medical-document-service/src/service.rs:36
↓ 5 callersMethodid
(&self)
recommendation-service/src/tasks/delivery.rs:11
↓ 5 callersFunctioninternal_error
Helper function to create internal server errors
recommendation-service/src/main.rs:53
↓ 5 callersMethodkey
(&self, child_id: &str, field: &str)
graph-flow/src/fanout.rs:105
↓ 4 callersMethodadd_conditional_edge
Add a conditional edge with an explicit `else` branch. `yes` is taken when `condition(ctx)` returns `true`; otherwise `no` is chosen.
graph-flow/src/graph.rs:108
↓ 4 callersMethodexecute
(&self, task_id: &str, context: Context)
graph-flow/src/graph.rs:297
↓ 4 callersFunctionextract_xml_value
(xml: &str, tag: &str)
medical-document-service/src/tasks/research_search.rs:258
↓ 4 callersFunctionget_llm_agent
(prompt: &str)
insurance-claims-service/src/tasks/utils.rs:3
↓ 4 callersMethodhistory_write
Acquire the chat history write lock, recovering from poisoning (see [`Context::history_read`]).
graph-flow/src/context.rs:448
↓ 3 callersMethodadd_message
Add a message to the chat history, respecting max_messages limit.
graph-flow/src/context.rs:280
↓ 3 callersFunctiongenerate_medical_summary
Generate medical summary from extracted text using LLM
medical-document-service/src/tasks/pdf_extract.rs:171
↓ 3 callersMethodget_chat_history
Get a clone of the current chat history. # Examples ```rust use graph_flow::Context; # #[tokio::main] # async fn main() { let context = Context::ne
graph-flow/src/context.rs:733
↓ 3 callersFunctionget_llm_agent
(prompt: &str)
medical-document-service/src/tasks/utils.rs:3
↓ 3 callersFunctionget_llm_agent
Create an LLM agent using OpenRouter
recommendation-service/src/tasks/utils.rs:6
↓ 3 callersFunctionget_llm_agent
----------------------------------------------------------------------------- A wrapper around `rig` so the example compiles only when OPENROUTER_API_
examples/recommendation_flow.rs:21
↓ 3 callersFunctionprocess_pdf_with_llm_ocr
Main function: PDF → Images → LLM OCR → Text
medical-document-service/src/tasks/pdf_extract.rs:67
↓ 3 callersMethodrun
(&self, context: Context)
medical-document-service/src/tasks/pdf_extract.rs:17
↓ 3 callersMethodrun
(&self, ctx: Context)
examples/fanout_basic.rs:14
↓ 2 callersFunctionbad_request_error
(message: &str)
medical-document-service/src/service.rs:22
↓ 2 callersFunctioncall_openrouter_api
Centralized function to call OpenRouter API with vision/text support
medical-document-service/src/tasks/pdf_extract.rs:207
↓ 2 callersMethodconnect
Connect with default pool settings (5 max connections) and run the schema migration. Use [`PostgresSessionStorage::with_pool`] for custom pool configu
graph-flow/src/storage_postgres.rs:23
↓ 2 callersMethodexecute_single_task
Execute a single task without following Continue actions
graph-flow/src/graph.rs:251
↓ 2 callersFunctionextract_text_with_llm_vision
Use LLM vision to extract text from images (OCR) - processes all images in one call
medical-document-service/src/tasks/pdf_extract.rs:114
↓ 2 callersMethodfind_next_task
Find the next task based on edges and conditions
graph-flow/src/graph.rs:328
↓ 2 callersMethodget_last_messages
Get the last N messages from chat history. # Examples ```rust use graph_flow::Context; # #[tokio::main] # async fn main() { let context = Context::
graph-flow/src/context.rs:788
↓ 2 callersFunctionnot_found_error
(message: &str, id: &str)
medical-document-service/src/service.rs:26
↓ 2 callersMethodremove
Remove a value from the context. Returns the removed value if it existed. # Examples ```rust use graph_flow::Context; # #[tokio::main] # async fn
graph-flow/src/context.rs:567
↓ 2 callersMethodrun
(&self, context: Context)
insurance-claims-service/src/tasks/final_summary.rs:15
↓ 2 callersMethodrun
(&self, context: Context)
graph-flow/src/fanout.rs:118
↓ 1 callersFunctionadd_document_fields_to_context
( document: &MedicalDocument, context_map: &mut std::collections::HashMap<String, serde_json::Value>,
medical-document-service/src/service.rs:252
↓ 1 callersMethodadd_system_message
Add a system message to the chat history.
graph-flow/src/context.rs:275
↓ 1 callersFunctionbuild_context_map
( session: &graph_flow::Session, )
medical-document-service/src/service.rs:235
↓ 1 callersFunctionbuild_feedback_response
(session_id: &str, result: graph_flow::ExecutionResult)
medical-document-service/src/service.rs:371
↓ 1 callersFunctionbuild_medical_workflow
()
medical-document-service/src/workflow.rs:7
↓ 1 callersFunctionbuild_router
(app_state: AppState)
medical-document-service/src/service.rs:81
↓ 1 callersMethodclear
Clear all messages from the chat history.
graph-flow/src/context.rs:291
↓ 1 callersFunctionconvert_pdf_to_images
Convert PDF to images using pdf2image
medical-document-service/src/tasks/pdf_extract.rs:86
↓ 1 callersFunctioncreate_app
()
medical-document-service/src/service.rs:52
↓ 1 callersFunctioncreate_app_state
()
medical-document-service/src/service.rs:57
↓ 1 callersFunctioncreate_cors_layer
Create permissive CORS layer for development/testing
insurance-claims-service/src/main.rs:78
↓ 1 callersFunctioncreate_default_graph
()
insurance-claims-service/src/main.rs:322
↓ 1 callersFunctioncreate_flow_runner
(session_storage: Arc<dyn SessionStorage>)
medical-document-service/src/workflow.rs:55
↓ 1 callersFunctioncreate_medical_analysis_session
(pdf_path: String)
medical-document-service/src/workflow.rs:31
↓ 1 callersFunctioncreate_session_storage
()
medical-document-service/src/service.rs:67
↓ 1 callersMethoddummy_sentiment
Very small heuristic fallback in case an LLM is not available.
examples/complex_example.rs:90
↓ 1 callersFunctionembed_query
Generate embedding for text using fastembed
recommendation-service/src/tasks/utils.rs:15
↓ 1 callersFunctionembed_query
Helper: obtain an embedding for the refined query using the `fastembed` crate.
examples/recommendation_flow.rs:30
↓ 1 callersMethodexecute_session
NextAction::GoBack must still be matched until removed
graph-flow/src/graph.rs:152
↓ 1 callersFunctiongenerate_research_summary
( summary: &str, articles: &[ResearchArticle], )
medical-document-service/src/tasks/research_search.rs:280
↓ 1 callersFunctiongenerate_search_queries
(summary: &str)
medical-document-service/src/tasks/research_search.rs:88
↓ 1 callersMethodget_all_messages
Get all messages from chat history as SerializableMessage. # Examples ```rust use graph_flow::Context; # #[tokio::main] # async fn main() { let con
graph-flow/src/context.rs:809
↓ 1 callersMethodget_last_rig_messages
Get the last N messages converted to rig::completion::Message format. This method is only available when the "rig" feature is enabled. # Examples `
graph-flow/src/context.rs:870
↓ 1 callersFunctionget_llm_agent
Very small wrapper around `rig` to obtain an agent that can answer our prompt.
examples/complex_example.rs:28
↓ 1 callersMethodhandle_approval_decision
(&self, context: Context, user_input: String)
insurance-claims-service/src/tasks/smart_claim_validator.rs:126
↓ 1 callersMethodid
(&self)
graph-flow/src/fanout.rs:116
↓ 1 callersFunctionimage_to_base64
Convert image to base64 for LLM vision API
medical-document-service/src/tasks/pdf_extract.rs:159
↓ 1 callersFunctioninit_tracing
Initialize structured JSON tracing based on environment variables
insurance-claims-service/src/main.rs:48
↓ 1 callersFunctionintegrate_feedback_with_summary
( initial_summary: &str, human_feedback: &str, )
medical-document-service/src/tasks/summary_integration.rs:60
↓ 1 callersMethodlast_messages
Get the last N messages. If N is greater than the total number of messages, all messages are returned. # Examples ```rust use graph_flow::ChatHisto
graph-flow/src/context.rs:329
↓ 1 callersMethodmessages
Get a reference to all messages.
graph-flow/src/context.rs:306
↓ 1 callersFunctionparse_apartment_details_from_response
Attempts to parse apartment insurance details from LLM response
insurance-claims-service/src/tasks/apartment_insurance_details.rs:43
↓ 1 callersFunctionparse_car_details_from_response
Attempts to parse car insurance details from LLM response
insurance-claims-service/src/tasks/car_insurance_details.rs:43
↓ 1 callersFunctionparse_insurance_type_from_response
Attempts to parse insurance type from LLM response
insurance-claims-service/src/tasks/insurance_type_classifier.rs:37
↓ 1 callersFunctionparse_pubmed_xml
(xml: &str)
medical-document-service/src/tasks/research_search.rs:230
↓ 1 callersFunctionprocess_initial_claim
(user_input: &str)
insurance-claims-service/src/tasks/initial_claim_query.rs:70
↓ 1 callersFunctionresume_workflow_with_feedback
(state: &AppState, session_id: &str)
medical-document-service/src/service.rs:334
↓ 1 callersMethodrun
(&self, context: Context)
recommendation-service/src/tasks/delivery.rs:15
↓ 1 callersMethodrun
(&self, context: Context)
examples/complex_example.rs:45
↓ 1 callersMethodrun
(&self, context: Context)
examples/recommendation_flow.rs:61
↓ 1 callersMethodrun
(&self, context: Context)
examples/simple_example.rs:15
↓ 1 callersMethodrun
Execute **exactly one** task for the given `session_id` and persist the updated session. This method: 1. Loads the session from storage 2. Executes t
graph-flow/src/runner.rs:386
↓ 1 callersFunctionsave_session
(state: &AppState, session: graph_flow::Session)
medical-document-service/src/service.rs:139
↓ 1 callersFunctionsave_session_after_feedback
( state: &AppState, session: graph_flow::Session, )
medical-document-service/src/service.rs:324
↓ 1 callersFunctionsearch_pubmed
(search_queries: &[String])
medical-document-service/src/tasks/research_search.rs:143
↓ 1 callersMethodset_max_execution_steps
Set the maximum number of chained `ContinueAndExecute` steps allowed within a single `execute_session` call. Guards against accidental infinite loops
graph-flow/src/graph.rs:60
↓ 1 callersMethodset_sync
Synchronous version of set for use when async is not available. # Examples ```rust use graph_flow::Context; let context = Context::new(); context.s
graph-flow/src/context.rs:659
↓ 1 callersMethodset_task_timeout
Set the timeout duration for task execution
graph-flow/src/graph.rs:53
↓ 1 callersFunctionsetup_graph
( graph_storage: Arc<dyn GraphStorage>, )
recommendation-service/src/main.rs:130
↓ 1 callersFunctionstart_workflow
(state: &AppState, session_id: &str)
medical-document-service/src/service.rs:146
↓ 1 callersMethodtry_set_sync
Synchronous, fallible version of [`Context::set`] (see [`Context::try_set`]).
graph-flow/src/context.rs:508
↓ 1 callersFunctionupdate_session_with_feedback
(session: &graph_flow::Session, feedback: &str)
medical-document-service/src/service.rs:306
↓ 1 callersFunctionvalidate_feedback
(feedback: &str)
medical-document-service/src/service.rs:299
↓ 1 callersFunctionvalidate_pdf_path
(pdf_path: &str)
medical-document-service/src/service.rs:132
↓ 1 callersMethodwith_prefix
Set a context prefix for storing aggregated child results. Aggregation keys will be written as `<prefix>.<child_id>.<field>`.
graph-flow/src/fanout.rs:94
Methodassistant
Create a new assistant message. # Examples ```rust use graph_flow::SerializableMessage; let msg = SerializableMessage::assistant("Hello! How can I
graph-flow/src/context.rs:188
next →1–100 of 194, ranked by callers