feedox/alt-gpt

Add client-side http connectors to other LLMs

Opened this issue · 1 comments

Check out the OpenAI client-side connector here as a reference.
Should be relatively easy to add a simple HTTP wrapper for other LLM providers, including HF.
Though, worth checking per each if it supports streaming.

Example where and how the current OpenAI API's currently implemented:
https://github.com/feedox/alt-gpt/blob/master/src/scripts/ts/modules/openAI.ts#L38

This is where it is being called in the code flow:
https://github.com/feedox/alt-gpt/blob/master/src/scripts/ts/modules/altGPT.ts#L175

With multiple LLM APIs, there should be a switch case to select the appropriate API based on the selected provider dropdown.