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

Extra params when calling anthropic /claude causes error in api invocation #25

Open
ensamblador opened this issue Feb 12, 2024 · 0 comments

Comments

@ensamblador
Copy link

Stack: QNABOT-BEDROCK-EMBEDDINGS-AND-LLM
Lambda: LLMLambdaFunction

the parameters return_full_text and max_new_tokens are not recognized by bedrock service, this causes an error with I fixed adding the following two lines ( after request_body.update(parameters))

if provider == "anthropic":
    request_body = {
        "prompt": prompt,
        "max_tokens_to_sample": DEFAULT_MAX_TOKENS
    } 
    request_body.update(parameters)
    if "return_full_text" in request_body: del request_body["return_full_text"]
    if "max_new_tokens" in request_body: del request_body["max_new_tokens"]
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

1 participant