mirror of
https://github.com/katanemo/plano.git
synced 2026-05-01 20:03:40 +02:00
Fix potential panic in create_http_context
Signed-off-by: José Ulises Niño Rivera <junr03@users.noreply.github.com>
This commit is contained in:
parent
5e22c24f77
commit
03291c018a
1 changed files with 4 additions and 1 deletions
|
|
@ -282,7 +282,10 @@ impl RootContext for FilterContext {
|
|||
// No StreamContext can be created until the Embedding Store is fully initialized.
|
||||
let embedding_store = match self.mode {
|
||||
GatewayMode::Llm => None,
|
||||
GatewayMode::Prompt => Some(Rc::clone(self.embeddings_store.as_ref().unwrap())),
|
||||
GatewayMode::Prompt => match self.embeddings_store.as_ref() {
|
||||
None => return None,
|
||||
Some(store) => Some(Rc::clone(store)),
|
||||
},
|
||||
};
|
||||
Some(Box::new(StreamContext::new(
|
||||
context_id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue