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

Chat API says message is too long in Codespaces #215590

Open
burkeholland opened this issue Jun 14, 2024 · 7 comments
Open

Chat API says message is too long in Codespaces #215590

burkeholland opened this issue Jun 14, 2024 · 7 comments
Assignees

Comments

@burkeholland
Copy link

burkeholland commented Jun 14, 2024

Version: 1.91.0-insider
Commit: 0da59bd
Date: 2024-06-14T10:11:28.580Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0

Steps to Reproduce:

  1. Create Codespace from https://github.com/burkeholland/chinook-pg-test
  2. Run ./install.sh to create and populate the chinook database
  3. Set the connection string for the @pg chat participant with @pg /conn postgres://postgres:postgres@localhost/chinook
  4. Ask the participant to show tables @pg /show - this will work - confirms connection string is set correctly.
  5. Ask the participant to list all artists @pg list all artists.

The participant will return the error message: "I can't find the schema for the database. Please check the connection string with /conn".

However, this doesn't appear to be the actual error. @brianrandell was able to narrow this down to the following error thrown in the @pg extension...

Image

Note that this works locally when run as a dev container.

@isidorn
Copy link
Contributor

isidorn commented Jun 17, 2024

Thanks for opening this issue. This message is probably coming from the Copilot API endpoint, and it should not have an effect if you trigger the API locally or from a codespace. Are you sure the exact same request is sent? You could look at the logs to compare.

@jrieken also might have ideas.

@jrieken
Copy link
Member

jrieken commented Jun 17, 2024

@jrieken
Copy link
Member

jrieken commented Jun 17, 2024

Tho, it is odd that this only happens in codespaces. There are known issues with codespaces getting a bad auth token, maybe that's the actual issue and the error message is a misleading consequence

@burkeholland
Copy link
Author

@isidorn oddly, I'm not seeing anything in the logs related to @pg. If I do a regular chat interaction, I do see the logs. But the @pg doesn't log anything anywhere as far as I can tell. Will speak to @robconery today about this.

@pwang347
Copy link
Member

For what it's worth, myself and a few others are seeing the same error from the latest samples: microsoft/vscode-extension-samples#1046

I was able to repro it without using Codespaces, but just building the sample and running it locally. The same one was also working before I updated my Insiders to 1.91.0-insider.

@roblourens
Copy link
Member

Doesn't this just mean that the pg participant sent the chat model a bad request?

@isidorn
Copy link
Contributor

isidorn commented Jun 19, 2024

There are known issues with codespaces getting a bad auth token, maybe that's the actual issue and the error message is a misleading consequence

I hit this when I try to debug an extension inside a Codespace. For example:

  1. Open chat-sample in codespace
  2. Debug it -> new tab gets opened with my extension running
  3. Chat view wants to login but it can not 🐛

Should I open a separate issue for this?
Or this might be what this issue is all about. @brianrandell is the scenario you are trying to achieve is develop and debug a local GH extension in a Codespace? Thanks!

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

No branches or pull requests

7 participants