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

Prompt Cache #4424

Open
miaoche7963 opened this issue Feb 5, 2025 · 2 comments
Open

Prompt Cache #4424

miaoche7963 opened this issue Feb 5, 2025 · 2 comments
Assignees
Labels
bug This issue is a confirmed bug. documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback.

Comments

@miaoche7963
Copy link

Describe the issue

I saw the 'cachePoint' feature in the official website introduction, applied for it, but encountered the following error during use: Reason: Parameter validation failed: Unknown parameter in system[1]: 'cachePoint', must be one of: text, guardContent.

Links

I want to know if there is an special boto3 versiton to user this feature

@miaoche7963 miaoche7963 added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Feb 5, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Feb 5, 2025
@RyanFitzSimmonsAK RyanFitzSimmonsAK added bug This issue is a confirmed bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Feb 5, 2025
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @miaoche7963, thanks for reaching out. Could you provide the following information?

  1. Could you link to the post you saw?
  2. What version of Boto3 are you using?
  3. What operation are you using? Debug logs would be helpful here. You can get debug logs by adding boto3.set_stream_logger('') to the top of your script, and redacting any sensitive information.

I want to know if there is an special boto3 versiton to user this feature

Boto3 does not have any special versions for specific features.

@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional information or feedback. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Feb 5, 2025
@miaoche7963
Copy link
Author

1.Environment
boto3==1.36.13
2.Code
The model id is anthropic.claude-3-5-haiku-20241022-v1:0

client = boto3.client("bedrock-runtime",
region_name="us-east-1", aws_access_key_id='XXX', aws_secret_access_key='XXX')

streaming_response = client.converse_stream(
modelId=model_id,
messages=conversation,
inferenceConfig={"maxTokens": 256, "temperature": 0.5, "topP": 0.9},
system=[
{"text": system_prompt},
{
"cachePoint": {
"type": "default"
}
}
],
performanceConfig = {
"latency" : "optimized"
}
3.Error
Reason: Parameter validation failed:
Unknown parameter in system[1]: "cachePoint", must be one of: text, guardContent
4.Question
I saw the 'cachePoint' feature in the official website introduction, applied for it, but encountered the following error during use: Reason: Parameter validation failed: Unknown parameter in system[1]: 'cachePoint', must be one of: text, guardContent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a confirmed bug. documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback.
Projects
None yet
Development

No branches or pull requests

2 participants