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

bugfix for #515 最新版本谷歌PaLM模型无法使用 #667

Merged
merged 5 commits into from
Nov 17, 2023

Conversation

mylxsw
Copy link
Contributor

@mylxsw mylxsw commented Nov 6, 2023

No description provided.

@songquanpeng
Copy link
Owner

误操作?

@mylxsw
Copy link
Contributor Author

mylxsw commented Nov 10, 2023

不是误操作,是调用 PaLM 模型的 API 时,不能添加 Authorization 请求头,加了后会出现 Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential 这个错误。

这里添加这个分支,请求 PaLM 时不添加请求头 Authorization 就可以正常使用了,解决 #515 问题。

@songquanpeng songquanpeng reopened this Nov 10, 2023
@songquanpeng
Copy link
Owner

为什么我看文档是设置 x-goog-api-key 呢?
image
https://developers.generativeai.google/tutorials/setup

@mylxsw
Copy link
Contributor Author

mylxsw commented Nov 16, 2023

有两种调用方式,我看之前one-api用的是第一种,但是这种不能同时再设置Authorization 请求头了。

image

@songquanpeng songquanpeng merged commit de7b971 into songquanpeng:main Nov 17, 2023
@songquanpeng
Copy link
Owner

Thx~

humphery755 added a commit to humphery755/one-api that referenced this pull request Nov 19, 2023
…ync-one-api

* 'main' of https://github.com/songquanpeng/one-api:
  fix: cloudflare test & expose detailed info about test failures (songquanpeng#715)
  feat: support tts model (songquanpeng#713)
  feat: keep sync with dall-e updates (songquanpeng#679)
  fix: fix PaLM not working issue (songquanpeng#667)
  fix: fix channel_id column name (songquanpeng#681, close songquanpeng#688)
  feat: add improve docker-compose.yml and support fast startup (songquanpeng#685)
  docs: add deploy to zeabur button (songquanpeng#693)
  fix: numeric sorting in tables (songquanpeng#695)
  feat: sync pricing for new 1106 models (songquanpeng#696)
  docs: update readme
  chore: update quota calc logic (close songquanpeng#599) (songquanpeng#627)
  fix: fix Cloudflare AI Gateway channel test support (songquanpeng#639)
  feat: support chatglm_turbo (songquanpeng#648)
  fix: fix typo (songquanpeng#651)
greeeds pushed a commit to greeeds/one-api that referenced this pull request Mar 3, 2024
* bugfix for songquanpeng#515 最新版本谷歌PaLM模型无法使用

* update

* chore: remove unrelated file

* chore: add comment

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
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.

None yet

2 participants