ansari-project/ansari-backend

Switch to using function templates for Qur'an search

Closed this issue · 1 comments

Difficulty: Medium
Est time: 6 hours

Currently Ansari uses a complicated way of for deciding whether a query is about the Qur'an or something else.

Since that was built, OpenAI has come out with function templates, see here: https://openai.com/blog/function-calling-and-other-api-updates

We use Langchain, so the goal of this project is to switch to using function templates using this: https://cobusgreyling.medium.com/langchain-agents-with-openai-function-calling-54a6e5573ec9

This will enable adding more sources of information, particularly hadith.

Completed. They work much better.