-
Notifications
You must be signed in to change notification settings - Fork 26
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
400 Bad Request Faraday error on a small variation of the sample code in README #24
Comments
I'd posted this on the discord yesterday. This is a duplicate. Attaching the questions here too.
|
@itsmeritesh did you mean "langchain" ? Check langchainrb or boxcars |
def extract_bio
response = claude.messages(
parameters: {
model: "claude-3-haiku-20240307",
system: @prompt,
messages: [
{ "role": "user", "content": ocr_text },
{ "role": "assistant", "content": @output_json_format }
],
max_tokens: 1000
}
)
puts response
rescue
$!.response_body
end |
Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
400 Bad Request - Faraday Error
To Reproduce
Steps to reproduce the behavior:
Running my function in a rails app.
Function takes a string argument OCR-text, which is scans of bio text books and written material.
Expected behavior
Should return a structured JSON of the organisms mentioned in the extracted_text.
CODE BLOCK
Desktop (please complete the following information):
Additional context
I'm declaring Anthropic::Client in an initializer.rb file.
The text was updated successfully, but these errors were encountered: