merefield / discourse-chatbot

An AI bot with RAG capability for Topics and Chat in Discourse, currently powered by OpenAI
GNU General Public License v2.0
63 stars 19 forks source link

Plans to add Gemini? #20

Open satonotdead opened 1 year ago

satonotdead commented 1 year ago

Bard can search the web for free! 🤟

image

image

https://github.com/ra83205/google-bard-api

merefield commented 1 year ago

Yes, I'd love to add support and for any emerging primary publicly-accessible LLM from Google.

Not whether but when I get around to it.

PR welcome in meantime!

merefield commented 10 months ago

Apologies, on review, I'm removing this from roadmap as given the general lack of community PRs I do not have capacity to entertain it.

dillfrescott commented 8 months ago

Awwww I think this would have been awesome!

merefield commented 8 months ago

I would accept a PR @dillfrescott if it's not a settings nightmare. That's why it's marked as PR Welcome and not Closed. If someone is willing to fund me I would consider doing it myself. Renaming the issue.

dillfrescott commented 8 months ago

Hey Robert thanks for the response. Is there a rough estimate of how much someone would have to pay for you to integrate it?

dillfrescott commented 8 months ago

Found this. Do you think that could work instead of having to integrate it into the plugin?

dillfrescott commented 8 months ago

Update: It works fantastically! updating the chatbot.prompt.post value to just %{raw} works great for Gemini!

EDIT: See updated prompt below for better performance!

merefield commented 8 months ago

That's nuts @dillfrescott!! ❤️. Great find!

And there's me thinking that proxies were just there to add Auth headers 😂

I wonder if there's a Claude equivalent?! : 🤔

merefield commented 8 months ago

Update: It works fantastically! updating the chatbot.prompt.post value to just %{raw} works great for Gemini!

Does Gemini struggle with usernames being included? Can you elaborate on what effect that has? Doesn't excluding them take away the ability of the bot to @mention?

dillfrescott commented 8 months ago

Hmm indeed was having issues with mentions. I hadn't tested that.

I changed the prompt to:

%{username} said:

%{raw}

You are a helpful assistant. Please respond to what %{username} said appropriately.

And now it works much better!

Screenshot 2024-03-09 035753

dillfrescott commented 8 months ago

I wonder if there's a Claude equivalent?

Honestly probably 😅

dillfrescott commented 8 months ago

aaaaaa

As you can see it also handles topic mention requests quite well!

merefield commented 8 months ago

Thinking about this some more, @dillfrescott, how is this arrangement going to handle Embeddings? That's critical to getting the full power out of Discourse Chatbot via RAG.

Looks like it is on their roadmap ... but not yet implemented ... and for now I suspect this is only going to work in Chatbot Basic mode?

dillfrescott commented 8 months ago

I don't think it can do embeddings yet, at least with this setup. I am using a different proxy though than the one I linked, currently.

dillfrescott commented 8 months ago

I would totally use openai's API but gemini API is totally free to use and openai's is not.

dillfrescott commented 8 months ago

I think this project can do embeddings from a quick glance at it.

merefield commented 8 months ago

I would totally use openai's API but gemini API is totally free to use and openai's is not.

I understand, though remember to manage your spend, especially by other forum members, you can use the inbuilt quota system.

merefield commented 8 months ago

I think this project can do embeddings from a quick glance at it.

that's a 404 for me

dillfrescott commented 8 months ago

my bad i linked a fork i deleted after testing it!

https://github.com/mth93/langchain-gemini-pro-proxy

merefield commented 8 months ago

I really like your original suggestion though as it has been package nicely with cloud deployment buttons. Let me know if you PR embeddings and function support ;)

merefield commented 8 months ago

I've added the original example and the approach to the Readme