[FREE PLUGIN] AI Proxy - ChatGPT, OpenAI, Claude, LlaMA, PaLM Real-Time Streaming

It’s on the example page! Not my own app

sample page doesnt have keys. To protect abuse of open ai. You need to bring your own api keys :slight_smile:

Gotcha makes sense. However, I’ve added my keys and it’s still not working!

Thanks, looks good

Update:

Well done!!. Would be super awesome if we could make the API request dynamic for those not using OpenAI and other streaming text gen APIs like from Oobabooga / AI21 / etc in the beta version :slight_smile:

Awesome on the dynamic API key! Like the previous comment, the thing that would make this ultra perfect would be able to specify the URL like you can the JSON so you could make it work with Azure and other services outside of OpenAI. I believe most of these text gen streaming APIs use the same method. Would something like that be possible? Would be killer for bot projects where you may need to use longer context like anthropic or a less censored model through open source methods.

Would be happy to pay for this and have been meaning to check out coalias for whitelabeling something else in this domain so will look a little closer on that.

Should be easy to do

Update 13 August 2023

  1. Advanced option: Added custom AI endpoint to allow to specify AI’s like Azure or others that have a similar api to OpenAI.

You can specify this endpoint in Action: Generate AI Token in the field Advanced: Custom AI URL

  1. Advanced option: Added a way to specify your own AI Proxy (hosted). Will release the code for soon. You can specify the custom hostname in the Element: OpenAI Stream.

Host your own AI proxy

You will need to understand how to use Cloudflare Workers to deploy this to Cloudflare. Or you can just use the build in free cloudflare worker!

Btw. Would love some 5***** reviews: AI Proxy - ChatGPT Streaming Plugin | Bubble

Change status to beta. Customer now using it in production and seems to be stable <3

This is great! I tried it however and couldn’t get it to work and I note that most services have a slightly different response for the way they do things. Not sure if this is even possible or not but would definitely help for advanced use would be the ability to add the example JSON response for the other providers outside of OpenAI, for example anthropic provide an output example of

“event: completion
data: {“completion”: " Hello”, “stop_reason”: null, “model”: “claude-2.0”}"

but then that also leads onto another issue in that Anthropic use ‘x-api-key’ and not ‘Bearer’.

Understand if this is outside the remit of what you want this to be but the potential for an ultimate AI streamer is very big if it can support multi providers.

Will leave a review shortly!

You tried it with openai?

For other providers, i dont have claude ai access. If someone can give it to me, its like 15 minutes to implement per provider

Sorry my post unclear, I did get it working with openAI and that worked great. I couldn’t get it to work with anything else and figured probably due to the different responses. Anthropic doc is here - Streaming. Would be able to share a key with you for testing, do you have an email or how do you want that shared?

Ill clean up the code, add better error handeling, improve security in the coming week.

I want to implement https://openrouter.ai/ first and then ill dm you for a claude api key :slight_smile:

When using model ‘gpt-3.5-turbo-16k-0613’ rather than ‘gpt-3.5-turbo’ replies are lightning fast :zap:

Update 14-8-2023

  • Added OpenRouter.ai support with support for the following models:

OpenAI: GPT-3.5 Turbo openai/gpt-3.5-turbo
OpenAI: GPT-3.5 Turbo 16k openai/gpt-3.5-turbo-16k
OpenAI: GPT-4 openai/gpt-4
OpenAI: GPT-4 32k openai/gpt-4-32k
Anthropic: Claude v2 anthropic/claude-2
Anthropic: Claude Instant v1 anthropic/claude-instant-v1
Google: PaLM 2 Bison google/palm-2-chat-bison
Google: PaLM 2 Bison (Code Chat) google/palm-2-codechat-bison
Meta: Llama v2 13B Chat (beta) meta-llama/llama-2-13b-chat
Meta: Llama v2 70B Chat (beta) meta-llama/llama-2-70b-chat
Nous: Hermes Llama2 13B (beta) nousresearch/nous-hermes-llama2-13b

  • Encrypting: You can now encrypt the prompt before sending it to the server, that way clients cant see your prompt!

can you send me the api key using a private message? I am done adding the security, code cleanup and error handling :slight_smile:

Awesome plugin! Good job @gaimed - whats the name of the video capturer you’re using?