enricoros / big-AGI

Generative AI suite powered by state-of-the-art models and providing advanced AI/AGI functions. It features AI personas, AGI functions, multi-model chats, text-to-image, voice, response streaming, code highlighting and execution, PDF import, presets for developers, much more. Deploy on-prem or in the cloud.
https://big-agi.com
MIT License
5.31k stars 1.2k forks source link

Big AGI connection to UM GPT #640

Open Rithikb123 opened 1 week ago

Rithikb123 commented 1 week ago

We are trying to connect our private University of Michigan GPT(api type is azure) to big AGI but we cant seem to connect it. We tried running bigAGI both locally as well as on vercel. We were able to confirm that the UM GPT endpoint and api key work through a different application. Here are the errors we get when trying to connect using a locally ran big AGI. We tried both azure and open ai

Screenshot 2024-09-14 at 1 29 57 PM Screenshot 2024-09-14 at 1 30 06 PM

If anyone has any experience connecting a third party gpt, any feedback would be appreciated

enricoros commented 1 week ago

@Rithikb123 does it go through a proxy? if you open the URL (in yellow) manually from Chrome, can you show me what happens and the network request?

Rithikb123 commented 1 week ago
image

This is what I see when I open the URL. However, I was able to confirm that the URL works through the swift app

enricoros commented 1 week ago

There seems to be a discrepancy of the Azure API. Do you know if the swift app has hardcoded models, or does it dynamically refresh the list? That could be the issue.

We need to understand what's the API server, doesn't seem a clean Azure. Would need a detailed analysis of which URLs are hit, and if there are differences in the headers, when the Swift UI does it.

Another option is for you to set a custom "OpenAI" server to your address and with your key, and see if that works.

Rithikb123 commented 1 week ago
Screenshot 2024-09-16 at 9 28 24 AM

This is how it looks in the swift app. We have tried both this URL as well as the one in the previous screenshot and both give the same responses. What do you mean by setting a custom OpenAI server. Do you mean on BigAGI or to set it seperately and then connect it to BigAGI later?

enricoros commented 1 week ago

Thanks for the details. Please ignore the suggestion about the custom OpenAI server, the Azure protocol is correct.

  1. I see one field called organization: is this field passed as a header parameter by any chance? Because in that case, I think that our implementation could be missing the parameter.

  2. Big-AGI works by first listing the models, and then using the model on the users' chats. In the screenshot I bought I see that the request gets sent already to a model ("gpt-35-turbo"). I wonder if maybe listing models is not supported by the UM server.