waleedkadous / ansari-backend

Ansari is a helper for you to become a better Muslim
65 stars 12 forks source link

Switch to using function templates for Qur'an search #3

Closed waleedkadous closed 7 months ago

waleedkadous commented 10 months ago

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.

waleedkadous commented 7 months ago

Completed. They work much better.