8000 getTextObject is throwing occasionally · Issue #22 · EvanZhouDev/gemini-ai · GitHub
[go: up one dir, main page]

Skip to content

getTextObject is throwing occasionally #22

Open

Description

@danew

Occasionally when calling gemini.ask the response throws the following error:

256 |   }
257 |   return parts;
258 | };
259 | var _Gemini = class _Gemini {
260 |   constructor(key, options = {}) {
261 |     this.getTextObject = (response) => response.candidates[0].content.parts[0];
                                                                    ^
TypeError: undefined is not an object (evaluating 'response.candidates[0].content.parts')
      at /Users/danew/development/github/SaneFYI/dbjs/node_modules/gemini-ai/dist/index.mjs:261:63
      at /Users/danew/development/github/SaneFYI/dbjs/node_modules/gemini-ai/dist/index.mjs:275:23

private getTextObject = (response: GeminiResponse) =>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0