CloudCannon / pagefind

Static low-bandwidth search at scale
https://pagefind.app
MIT License
3.45k stars 111 forks source link

Feature: Add the capacity to call openai api #488

Closed MChorfa closed 11 months ago

MChorfa commented 11 months ago

Motivation: I want to be able to search on my static website and to able to generate new content from my search to augment the user experience.

Holistic Workflow:

That way we have dynamic Retrieval Augmented Generation on static content

Inspiration: https://www.mendable.ai/

bglw commented 11 months ago

👋

This is somewhat outside of the scope of Pagefind. Any augmentation or result hydration is possible with the existing APIs. Anything beyond that is out of Pagefind's realm as a frontend library — taking OpenAI as an example, there is no context for Pagefind to integrate that wouldn't expose your API key on a public site. You'd need to host your own server to proxy those requests, and everything Pagefind needs to permit that workflow exists already 🙂