Skip to main content

parse_tool

Function parse_tool 

Source
async fn parse_tool<'a>(
    conn: &'a mut PgConnection,
    lines: Pin<Box<Peekable<LinesStream<StreamReader<BoxStream<'a, Result<Bytes, Error>>, Bytes>>>>>,
    conversation_id: Uuid,
    user_context: &'a ChatbotUserContext,
) -> BoxStream<'a, ChatbotResult<StreamEvent<'a>>>
Expand description

Streams and parses a LLM response from Azure that contains function calls. Calls the functions and yields a Vec of function results to be sent to Azure. Consumes the lines (stream), because it ends when a custom function call is made. Returns a stream to be consumed in the caller.