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

Thoughts on the API #245

Open
0wwafa opened this issue Sep 2, 2024 · 0 comments
Open

Thoughts on the API #245

0wwafa opened this issue Sep 2, 2024 · 0 comments
Assignees
Labels
component:js sdk Issue/PR related to JavaScript SDK status:triaged Issue/PR triaged to the corresponding sub-team type:bug Something isn't working

Comments

@0wwafa
Copy link

0wwafa commented Sep 2, 2024

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

@manojssmk manojssmk added type:bug Something isn't working status:triaged Issue/PR triaged to the corresponding sub-team component:js sdk Issue/PR related to JavaScript SDK labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:js sdk Issue/PR related to JavaScript SDK status:triaged Issue/PR triaged to the corresponding sub-team type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants