Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/NVIDIA-AI-Blueprints/retail-shopping-assistant
/ functions
Functions
159 in github.com/NVIDIA-AI-Blueprints/retail-shopping-assistant
⨍
Functions
159
◇
Types & classes
48
↳
Endpoints
22
↓ 10 callers
Function
addMessage
(role: string, content: any, productName: string = "")
ui/src/components/chatbox/chatbox.tsx:146
↓ 3 callers
Method
_get_cart
(self, user_id: int)
chain_server/src/cart.py:56
↓ 3 callers
Method
image_embeddings
Generate image embeddings from a list of base64 image strings or image URLs using batching. Returns a list of embeddings, with None f
catalog_retriever/src/retriever.py:286
↓ 3 callers
Function
sleep
(ms: number)
ui/src/components/chatbox/chatbox.tsx:68
↓ 3 callers
Function
sleep
(ms: number)
ui/src/utils/index.ts:124
↓ 2 callers
Function
cleanItemName
(item: string)
ui/src/utils/index.ts:190
↓ 2 callers
Function
create_initial_state
Create initial state from request.
chain_server/src/main.py:98
↓ 2 callers
Function
getOrCreateUserId
()
ui/src/utils/index.ts:41
↓ 2 callers
Function
load_config
Load configuration from YAML file with optional override support. Args: config_path: Optional path to config file. If None, uses
chain_server/src/config.py:127
↓ 2 callers
Method
retrieve
Asynchronously retrieve relevant items from both text and image databases.
catalog_retriever/src/retriever.py:444
↓ 2 callers
Method
text_embeddings
Generate text embeddings from a list of text strings, using chunking and batching.
catalog_retriever/src/retriever.py:189
↓ 2 callers
Function
updateLastMessage
(newContent: any, role?: string, appendContent?: boolean)
ui/src/components/chatbox/chatbox.tsx:161
↓ 1 callers
Method
_add_to_cart
(self, user_id: int, item_name: str, quantity: int)
chain_server/src/cart.py:64
↓ 1 callers
Method
_call_llm_for_routing
Call the LLM to determine the appropriate agent for the query. Args: query: The user's query
chain_server/src/planner.py:89
↓ 1 callers
Method
_create_routing_messages
Create the messages for the routing decision. Args: query: The user's query to route Return
chain_server/src/planner.py:68
↓ 1 callers
Method
_create_text_chunks
Break all input texts into smaller chunks and return the chunks and their counts.
catalog_retriever/src/retriever.py:211
↓ 1 callers
Method
_embed_chunks_in_batches
Embed all created chunks in efficient batches.
catalog_retriever/src/retriever.py:226
↓ 1 callers
Method
_get_categories
Use the LLM to determine relevant categories for the query using the search function.
chain_server/src/retriever.py:144
↓ 1 callers
Method
_normalize_agent_name
Normalize agent names to match graph node names. Args: agent_name: Raw agent name from LLM
chain_server/src/planner.py:118
↓ 1 callers
Method
_reconstruct_embeddings
Reconstruct a single embedding for each original text from chunk embeddings.
catalog_retriever/src/retriever.py:256
↓ 1 callers
Method
_remove_from_cart
(self, user_id: int, item_name: str, quantity: int)
chain_server/src/cart.py:100
↓ 1 callers
Method
add_timing
Add timing information for a specific safety check.
chain_server/src/agenttypes.py:110
↓ 1 callers
Function
apply_endpoint_overrides
Apply endpoint overrides to the RailsConfig if CONFIG_OVERRIDE is set. Args: config: RailsConfig object to modify config
guardrails/src/config_utils.py:12
↓ 1 callers
Function
base64ToBlob
(base64: string)
ui/src/components/chatbox/chatbox.tsx:88
↓ 1 callers
Method
call_input_content_rails
(self, user_input: str)
guardrails/test/test_rails.py:22
↓ 1 callers
Method
call_input_content_rails
(self, user_input: str)
guardrails/src/rails.py:18
↓ 1 callers
Method
call_input_topic_rails
(self, user_input: str)
guardrails/test/test_rails.py:36
↓ 1 callers
Method
call_output_content_rails
(self, user_input: str)
guardrails/test/test_rails.py:50
↓ 1 callers
Method
call_output_content_rails
(self, user_input: str)
guardrails/src/rails.py:21
↓ 1 callers
Function
check_input
(request: QueryRequest)
guardrails/src/main.py:24
↓ 1 callers
Function
check_output
(request: QueryRequest)
guardrails/src/main.py:37
↓ 1 callers
Function
clearUserSession
()
ui/src/utils/index.ts:54
↓ 1 callers
Function
convertToBase64
(file: File)
ui/src/components/chatbox/chatbox.tsx:79
↓ 1 callers
Function
convertToBase64
(file: File)
ui/src/utils/index.ts:14
↓ 1 callers
Function
createApiRequest
( userId: number, query: string, image: string = '', guardrails: boolean = true )
ui/src/utils/index.ts:106
↓ 1 callers
Function
create_graph
Create the LangGraph for the shopping assistant. The graph orchestrates the flow between different specialized agents: - Memory retr
chain_server/src/graph.py:175
↓ 1 callers
Function
detectCartOperation
(message: string)
ui/src/utils/index.ts:214
↓ 1 callers
Method
embed_chunk
Embed a chunk of text.
catalog_retriever/src/retriever.py:170
↓ 1 callers
Method
embeddings_exist
Check if embeddings already exist in both text and image collections. Returns True if both collections have data, False otherwise.
catalog_retriever/src/retriever.py:141
↓ 1 callers
Function
getConfig
()
ui/src/config/config.ts:45
↓ 1 callers
Function
getDefaultImage
()
ui/src/config/config.ts:97
↓ 1 callers
Method
getGuardRails
(self)
guardrails/src/rails.py:55
↓ 1 callers
Function
getOrCreateUserId
()
ui/src/components/chatbox/chatbox.tsx:70
↓ 1 callers
Function
handleFileUpload
(file: File)
ui/src/utils/index.ts:61
↓ 1 callers
Function
handleReset
()
ui/src/components/chatbox/chatbox.tsx:350
↓ 1 callers
Function
handleSendMessage
()
ui/src/components/chatbox/chatbox.tsx:190
↓ 1 callers
Function
harmonize_timings
(timings, all_phases)
tests/time_breakdown.py:32
↓ 1 callers
Method
has_image
Check if the state contains an image.
chain_server/src/agenttypes.py:84
↓ 1 callers
Function
image_path_to_base64
Converts an image to a base64 string.
catalog_retriever/src/utils.py:18
↓ 1 callers
Function
image_url_to_base64
Fetches an image from a URL, resizes and compresses it, then returns a base64-encoded string. Skips encoding if the base64 string would excee
catalog_retriever/src/utils.py:44
↓ 1 callers
Function
initialize_agents
Initialize all agent instances.
chain_server/src/main.py:38
↓ 1 callers
Function
isFashionMode
()
ui/src/config/config.ts:93
↓ 1 callers
Function
isSecondPersonCartNarration
(message: string)
ui/src/utils/index.ts:201
↓ 1 callers
Method
is_empty_query
Check if the query is empty.
chain_server/src/agenttypes.py:88
↓ 1 callers
Function
is_path
Simple check if a string is a path.
catalog_retriever/src/utils.py:110
↓ 1 callers
Function
is_url
Simple check if a string is a URL.
catalog_retriever/src/utils.py:103
↓ 1 callers
Function
judge_test
( query: str, answer: str, ideal_answer: str, verbose: bool = True )
tests/response_quality.py:23
↓ 1 callers
Function
load_config_with_override
Load configuration from YAML file with optional override support.
catalog_retriever/src/main.py:31
↓ 1 callers
Function
load_config_with_override
Load configuration from YAML file with optional override support. Args: base_config_path: Path to the base configuration file
chain_server/src/config.py:20
↓ 1 callers
Function
main
Run all tests.
chain_server/test_config.py:179
↓ 1 callers
Method
milvus_from_csv
Fills the milvus database with the data from a CSV file. Only populates if embeddings don't already exist.
catalog_retriever/src/retriever.py:377
↓ 1 callers
Function
parseStreamingChunk
(rawData: string)
ui/src/utils/index.ts:89
↓ 1 callers
Function
plot_all_averages
(data, save_directory)
tests/time_breakdown.py:35
↓ 1 callers
Function
read_all_timings
(directory)
tests/time_breakdown.py:10
↓ 1 callers
Function
resize_base64_image
Resize a base64 image to fit within the size limits.
catalog_retriever/src/utils.py:117
↓ 1 callers
Function
scheduleEnableSubmit
()
ui/src/components/chatbox/chatbox.tsx:204
↓ 1 callers
Function
send_updates
Generator function for streaming updates.
chain_server/src/main.py:127
↓ 1 callers
Function
showCartNotification
( fullResponse: string, shownOperations: Set<string>, toast: any )
ui/src/utils/index.ts:256
Function
App
()
ui/src/App.tsx:17
Function
Apparel
({ newRenderImage })
ui/src/components/Apparel.tsx:26
Function
Chatbox
({ setNewRenderImage })
ui/src/components/chatbox/chatbox.tsx:53
Function
Footer
()
ui/src/components/Footer.tsx:24
Function
Loader
()
ui/src/components/chatbox/Loader.tsx:20
Function
Navbar
()
ui/src/components/Navbar.tsx:26
Function
SafeHTML
({ html })
ui/src/components/chatbox/SafeHTML.tsx:26
Method
__init__
(self, retriever)
catalog_retriever/src/retriever.py:48
Method
__init__
(self, retriever)
catalog_retriever/src/retriever.py:67
Method
__init__
( self, config: RetrieverConfig )
catalog_retriever/src/retriever.py:90
Method
__init__
Initialize the PlannerAgent. Args: config: Configuration instance
chain_server/src/planner.py:40
Method
__init__
( self, config, )
chain_server/src/retriever.py:36
Method
__init__
Initialize the SummaryAgent with LLM configuration. Args: config: Configuration instance
chain_server/src/summarizer.py:25
Method
__init__
Initialize the ChatterAgent with LLM configuration. Args: config: Configuration instance
chain_server/src/chatter.py:26
Method
__init__
(self, config, )
chain_server/src/cart.py:36
Method
__init__
(self, config_path: str)
guardrails/src/rails.py:26
Method
_update_context
(self, user_id: int, context: str)
chain_server/src/cart.py:136
Function
add_context
(user_id: int, context_update: ContextUpdate)
memory_retriever/src/main.py:135
Method
add_timing
Add timing information for a processing step.
chain_server/src/agenttypes.py:76
Function
add_to_cart
(user_id: int, item_update: ItemUpdate)
memory_retriever/src/main.py:86
Function
base64ToBlob
(base64: string)
ui/src/utils/index.ts:26
Method
call_input_content_rails
Generate a response to user input using the LLM
guardrails/src/rails.py:36
Method
call_output_content_rails
Generate a response to user input using the LLM
guardrails/src/rails.py:43
Method
check_input_safety
Check if the user input is safe using guardrails.
chain_server/src/graph.py:83
Method
check_output_safety
Check if the generated response is safe using guardrails.
chain_server/src/graph.py:115
Method
check_rail_node
Process rail check results and update state timings.
chain_server/src/graph.py:147
Function
clearImage
()
ui/src/components/chatbox/chatbox.tsx:141
Function
clear_cart
(user_id: int)
memory_retriever/src/main.py:121
Function
clear_context
(user_id: int)
memory_retriever/src/main.py:165
Function
clear_user
(user_id: int)
memory_retriever/src/main.py:178
Method
decide_function
Return the next agent to route to based on the state. This method is used by the LangGraph for conditional routing.
chain_server/src/planner.py:187
Method
decide_if_input_safe
Route based on input safety check.
chain_server/src/graph.py:165
next →
1–100 of 159, ranked by callers