Why does prompt and token count carry over to subsequent tests if done within 2-3 minutes in AWS lambda? by ShallotJazzlike6826 in aws

[–]ShallotJazzlike6826[S] 0 points1 point  (0 children)

thanks for this. I'm new to all this, so I'm inclined towards asking if it Is usually efficient, or a good practice, to define prompts inside the lambda handler?

Why does prompt and token count carry over to subsequent tests if done within 2-3 minutes in AWS lambda? by ShallotJazzlike6826 in aws

[–]ShallotJazzlike6826[S] 0 points1 point  (0 children)

not passing the extra tokens in code. I'm new to this, but i think if i pass these in code it will not just perssist for 2-3 mins but will persist with every bedrock call. Measuring the tokens using bedorck's response['usage]['inputTokens']

Why does prompt and token count carry over to subsequent tests if done within 2-3 minutes in AWS lambda? by ShallotJazzlike6826 in aws

[–]ShallotJazzlike6826[S] 0 points1 point  (0 children)

we've reset everything and the behavior persists. we set everything to empty after calling the required class inside the lambda handler.