Comments (4)
I just checked the Lambda that I pulled the log from and its timeout is set to 15 min, so it should not be the issue
from generative-ai-application-builder-on-aws.
I changed the deployment settings to NOT use streaming and I get the same result: Corrupted response ending in the middle of the response.
I also tried Claude V2 and V2.1, both have the same issue
from generative-ai-application-builder-on-aws.
I seem to have found the issue.. It is a too tighly set max_tokens_to_sample
based on DEFAULT_MAX_TOKENS_TO_SAMPLE
by changing it to 4096 the response does not get canceled anymore
from generative-ai-application-builder-on-aws.
Hi @wzr1337, thanks for the report and for taking the time to work through a detailed analysis of the issue.
As you've identified, many LLMs come with the ability to truncate/cap the number of output tokens generated. One of the primary things this helps to do is control costs by providing an upper bound on the number of output tokens generated by the model (output tokens are substantially more costly than input tokens).
For the anthropic family of models this can be controlled by a model parameter called max_tokens_to_sample
(for their text completion API).
At the time this integration was first built, the default value for this parameter used by Anthropic's API was 256
, so we chose to match this. This may have changed since the first release, so we will have a look and reassess for our next release.
That being said, the solution allows for customers to override any of the default model parameters and provide their own. You can do this at deployment time by setting an advanced model parameter at the model selection step (see example screenshot below). The parameters supported depends on the specific model used, so consult the model documentation.
Adding Advanced Parameters:
![image](https://private-user-images.githubusercontent.com/111378641/310224739-2cc7c0b4-3e3c-4015-8713-3ee89bde49a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMjYwMjgsIm5iZiI6MTcyMjAyNTcyOCwicGF0aCI6Ii8xMTEzNzg2NDEvMzEwMjI0NzM5LTJjYzdjMGI0LTNlM2MtNDAxNS04NzEzLTNlZTg5YmRlNDlhNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyNlQyMDI4NDhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05ZDQwMjE0MzE4MmY0MmQ2MTliNjFhZWM4NDdlN2Y2NjI3YTFiNmM3MGFlMGFlYmYyYmRiYzZlNTZhNWE4OWQ3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.V4zNVEi9GELTfNJc9JL1ntJTjAmyeKTANQQNVSf0-Xg)
from generative-ai-application-builder-on-aws.
Related Issues (20)
- don't use a static login UI and use the Cognito UI for more functionalities HOT 2
- Add language parameter for Kendra search HOT 6
- CORS error after deployment HOT 12
- Incorrect README doucmentation HOT 2
- Initial deployment failed to create UseCasesTableXXX based on KMS validation error: com.amazonaws.services.kms.model.NotFoundException: Key 'arn:aws:kms:us-east-1:xxx:key/xxxx' does not exist HOT 2
- [Question] Chat service failed to respond. Please contact your administrator for support and quote the following trace id. HOT 7
- Source code highlighting for chatbot. HOT 3
- Chat over single uploaded document HOT 1
- Option to use Bedrock knowledge base instead of kendra HOT 2
- UI: add option to see the Prompt history per session HOT 1
- Additional permissions are required HOT 3
- OpenAPI doc for the REST API? HOT 2
- Ability to work with Bedrock Agents HOT 1
- Add option to use Bedrock in a different AWS region HOT 3
- Deployment of use case fails when email address is provided for the use case. HOT 2
- support for query of non-english documents HOT 2
- support for claude 3 / sonnet & haiku HOT 2
- UI/Backend misalignment of prompt limit enforcement HOT 2
- Chat Failed with RAG for Cohere and Meta models HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generative-ai-application-builder-on-aws.