Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adjust for ollama support #4129

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

fred-bf
Copy link
Contributor

@fred-bf fred-bf commented Feb 26, 2024

Copy link

vercel bot commented Feb 26, 2024

@fred-bf is attempting to deploy a commit to the NextChat Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Feb 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextchat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 26, 2024 6:39am

Copy link
Contributor

Your build has completed!

Preview deployment

Copy link
Contributor

@H0llyW00dzZ H0llyW00dzZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this need a test

@@ -151,7 +151,6 @@ export function getHeaders() {
const accessStore = useAccessStore.getState();
const headers: Record<string, string> = {
"Content-Type": "application/json",
"x-requested-with": "XMLHttpRequest",
Copy link
Contributor

@H0llyW00dzZ H0llyW00dzZ Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may need to test this by removing it just for ollama support which currently is unstable. Be aware that this action might disrupt the custom URL endpoint.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested works fine with OpenAI & Gemini API, do you have any other suggestions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested works fine with OpenAI & Gemini API, do you have any other suggestions?

@fred-bf

The one-api works fine with both OpenAI (gpt,dalle) and Gemini. However, I haven't been able to test other models yet because I don't have access to them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because both the OpenAI and Google Gemini APIs return data in JSON format, this field is not expected to be necessary for the current scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The origin commit aims to resolve not showing auth page, I just double check it works as expected when server returns 401 status code.

600b181

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The origin commit aims to resolve not showing auth page, I just double check it works as expected when server returns 401 status code.

600b181

It's better to keep I think

@fred-bf fred-bf merged commit ff166f7 into ChatGPTNextWeb:main Feb 26, 2024
3 checks passed
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants