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

Fix requestOptions in startChat #228

Merged
merged 3 commits into from
Aug 22, 2024
Merged

Fix requestOptions in startChat #228

merged 3 commits into from
Aug 22, 2024

Conversation

wong2
Copy link
Contributor

@wong2 wong2 commented Aug 16, 2024

Fix #227

In PR #144, the requestOptions of GenerativeModel is renamed to _requestOptions, but there's a requestOptions type declaration on the class, so TypeScript didn't catch the miss use of requestOptions instead of _requestOptions in the startChat method.

Copy link

google-cla bot commented Aug 16, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@hsubox76
Copy link
Collaborator

Thanks for catching this - two things:

  1. there's been a refactor merged since you submitted this (the file moved)
  2. run yarn changeset to add a changeset file (select "patch") to ensure this gets published

@wong2
Copy link
Contributor Author

wong2 commented Aug 20, 2024

@hsubox76 I have rebased the branch.

However, I can't get yarn changeset working.

Internal Error: @google/generative-ai@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
    at $x.getCandidates (/Users/wong2/.cache/node/corepack/yarn/4.0.1/yarn.js:205:8149)

The error remains after I run yarn install.

Perhaps you can merge this and run the changeset command instead?

@hsubox76
Copy link
Collaborator

I think some files must be leftover after the rebase, it works fine for me on your fork. Anyway you can manually add the changeset file. If we do it in a separate PR it won't link to this PR properly. Create a file: .changeset/real-windows-itch.md (autogenerated name I got). Contents:

---
"@google/generative-ai": patch
---

Fix reference to `requestOptions` in `startChat`.

@wong2
Copy link
Contributor Author

wong2 commented Aug 21, 2024

@hsubox76 I've added the changeset file

hsubox76
hsubox76 previously approved these changes Aug 21, 2024
@hsubox76
Copy link
Collaborator

hsubox76 commented Aug 21, 2024

Thanks for removing the requestOptions class property, I think we missed it in #144

Are you able to run yarn docs to update the docs? If not, I can do it in a follow-up PR.

@wong2
Copy link
Contributor Author

wong2 commented Aug 22, 2024

@hsubox76 Done!

@hsubox76
Copy link
Collaborator

I ran the integration tests locally as outside contributors don't have access to the API key secret - passed.

Thanks for the contribution, merging!

@hsubox76 hsubox76 merged commit fdfb5bd into google-gemini:main Aug 22, 2024
5 of 9 checks passed
hsubox76 pushed a commit that referenced this pull request Sep 5, 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.

baseUrl not working since 0.16.0
2 participants