Skip to content

Thoughts on the API #245

Open
Open
@0wwafa

Description

@0wwafa

Description of the bug:

If I understood correctly, to have an interactive chat session you can for example:

  const askQuestion = async () => {
    readline.question("You: ", async (input) => {
      if (input.toLowerCase() === "quit") {
        readline.close();
        return;
      }

      const result = await chatSession.sendMessage(input);
      console.log("AI: " + result.response.text());
      askQuestion();
    });
  };

but I noticed that as the chat proceeds, the history grows and every single prompt ALL the history is sent.

Isn't this "stupid"?
Shouldn't the "session" be kept server side and only the last prompt be sent?

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions