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

KeyError #1

Open
mp3pintyo opened this issue Mar 26, 2024 · 1 comment
Open

KeyError #1

mp3pintyo opened this issue Mar 26, 2024 · 1 comment

Comments

@mp3pintyo
Copy link

mp3pintyo commented Mar 26, 2024

Hello! unfortunately it doesn't work for me. This error is reported by Google Colab.
(I can see that the request went to SerpApi and Antrophic.)

KeyError Traceback (most recent call last)
in <cell line: 140>()
140 for term in search_terms:
141 search_results = get_search_results(term)
--> 142 urls = select_relevant_urls(search_results)
143 relevant_urls.extend(urls)
144

in select_relevant_urls(search_results)
56 }
57 response = requests.post("https://api.anthropic.com/v1/messages", headers=headers, json=data)
---> 58 response_text = response.json()['content'][0]['text']
59
60 numbers = ast.literal_eval(response_text)

KeyError: 'content'

@srad11
Copy link

srad11 commented Apr 10, 2024

Did you manage to resolve this?

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

2 participants