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

Ability to pass in request headers for model endpoints #368

Closed
lotif opened this issue Jul 25, 2023 · 3 comments
Closed

Ability to pass in request headers for model endpoints #368

lotif opened this issue Jul 25, 2023 · 3 comments

Comments

@lotif
Copy link

lotif commented Jul 25, 2023

Hello.

I am trying to add an AWS Sagemaker model endpoint to chat-ui and I am getting stuck on the authorization part because I can't pass in request headers to the endpoint. I am able to pass in the authorization string but then I get the following error:

Could not parse last message {"message":"Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=AWS4-HMAC-SHA256 Credential=<redacted>, Signature=<redacted>"}
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at parseGeneratedText (/src/routes/conversation/[id]/+server.ts:196:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async saveMessage (/src/routes/conversation/[id]/+server.ts:107:26)

Is it possible to add the ability to pass in headers to the model endpoints in the .env.local file?

@lotif
Copy link
Author

lotif commented Jul 26, 2023

Nevermind, I figured authorization to sagemaker is more complex than I anticipated (as noted by #326 ) and ended up solving the issue differently.

@lotif lotif closed this as not planned Won't fix, can't repro, duplicate, stale Jul 26, 2023
@julien-c
Copy link
Member

@lotif see #301 btw as sagemaker endpoint support was just merged

@lotif
Copy link
Author

lotif commented Aug 18, 2023

I saw that, great news, 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

2 participants