Why builtin chat engine is not being used? #17

Open
opened 2026-02-15 23:16:47 -05:00 by yindo · 1 comment
Owner

Originally created by @Sai-Rohith-Bobba on GitHub (Sep 26, 2023).

In The Given project is there any specific reason for using custom chat engine by building a chat engine out of query engine and AnyIO memory stream when there is in built chat engine

Originally created by @Sai-Rohith-Bobba on GitHub (Sep 26, 2023). In The Given project is there any specific reason for using custom chat engine by building a chat engine out of query engine and AnyIO memory stream when there is in built chat engine
Author
Owner

@sourabhdesai commented on GitHub (Sep 26, 2023):

@Sai-Rohith-Bobba thanks for the great question!

If you look at the code here in app/chat/engine.py you'll see that we do use the OpenAIAgent class from the LlamaIndex framework which is itself an implementation of a chat engine. The code in app/api/endpoints/conversation.py that creates the anyio channel simply takes the callback events & response tokens from that OpenAIAgent chat engine and sends them to the frontend over the SSE protocol.

@sourabhdesai commented on GitHub (Sep 26, 2023): @Sai-Rohith-Bobba thanks for the great question! If you look at [the code here in `app/chat/engine.py`](https://github.com/run-llama/sec-insights/blob/main/backend/app/chat/engine.py#L331-L341) you'll see that we do use the `OpenAIAgent` class from the LlamaIndex framework which is itself an implementation of a chat engine. The [code in `app/api/endpoints/conversation.py` that creates the `anyio` channel](https://github.com/run-llama/sec-insights/blob/main/backend/app/api/endpoints/conversation.py#L70-L165) simply takes the callback events & response tokens from that `OpenAIAgent` chat engine and sends them to the frontend over the SSE protocol.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/sec-insights#17