88 questions
2
votes
3
answers
6k
views
Could not start MCP server for Brave Search in Computer Use and Claude Desktop
I am setting up Computer use (beta) for Anthropic in Windows PoweShell (administrator). But when I want to connect to MCP server for Brave Search in Claude desktop app, I received this error:
Could ...
0
votes
1
answer
739
views
How to send a base64 image to Bedrock via ConverseCommand as bytes
I'm trying to upload an image to AWS Bedrock Claude model using the ConverseCommand (in @aws-sdk/client-bedrock-runtime 3.699.0).
I have the base64 version of image (eg https://yulvil.github.io/...
0
votes
1
answer
291
views
How to Add Labels to API Calls for Anthropic Models using Vertex AI on GCloud?
I'm using Vertex AI on Google Cloud, where I know that it's possible to define labels for LLM requests via generateContent API calls, as described in this documentation: Custom metadata labels.
I am ...
0
votes
1
answer
847
views
Can't send image to Bedrock using ConverseCommand in JavaScript
I'm trying to upload an image to AWS Bedrock as part of a conversation using the ConverseCommand (in @aws-sdk/client-bedrock-runtime v3.686). According to the documentation, it requires the bytes as a ...
1
vote
1
answer
1k
views
AWS Bedrock Claude Sonnet 3.5 with image and system prompt
I need to invoke a Bedrock Claude Sonnet 3.5 model with:
System prompt
An Image that I have in .JPEG locally in the disk
a context in text
a query
Im getting an error in JSON payload with the image.
...
1
vote
2
answers
437
views
Asyncio + Claude raises a "RuntimeError: Event loop is closed"
I have a very simple toy example that uses Claude and asyncio.
It is a loop that runs several times the asyncio.run() function.
Sometimes, a
RuntimeError: Event loop is closed
exception is raised ...
0
votes
1
answer
788
views
How to make Claude API stop after producing certain special words?
I have some words that I do not want produced by Claude. No matter how I prompt it, there is a non zero chance that it will still get produced in the output. So I want to make it stop when it produces ...
2
votes
1
answer
1k
views
Why do I get a TypeException when running Claude API in parallel?
I successfully ran OpenAI GPT4o in parallel with multiprocessing:
def llm_query(chunk):
context, query = get_prompt_synonyms()
input1, output1 = get_example()
response = client.chat....
2
votes
0
answers
308
views
Claude/Sonnet Python API - more tokens freezes, less tokens truncates
My prompt was to create a blog with 5 sections covering 5 different individuals in an industry niche.
When I had max_tokens= 300 (and then 1000), it ran quickly, but the result was not complete.
When ...
2
votes
0
answers
741
views
How to sample multiple completions (n) directly from Claude API without a for loop
I'm using the Anthropic Claude API and I'm trying to generate multiple completions (n completions) for a given prompt in a single API call. OpenAI's API provides an n parameter in their sampling ...
1
vote
0
answers
1k
views
Getting Malformed input request when trying to use Claude Sonet Model by Bedrock
Got the below error -
software.amazon.awssdk.services.bedrockruntime.model.ValidationException: Malformed input request, please reformat your input and try again.
I am using below code -
{
...
-2
votes
1
answer
1k
views
CORS Error on https://api.anthropic.com/v1/messages API with Reacrt.js [closed]
I am facing CORS issue while integrating 'https://api.anthropic.com/v1/messages',
Does anyone solved it?
try {
const response = await axios.post(
'https://api.anthropic.com/v1/messages',
...
0
votes
1
answer
2k
views
How to Track Token Usage with TikToken Library for Anthropic Models in llama-index Query Engine?
I'm facing an issue with tracking token usage for Anthropic models using the TikToken library. The tiktoken library natively supports OpenAI models, but I'm working with the Claude-3 model family from ...
1
vote
0
answers
3k
views
Claude API error despite showing that it's working in Anthropic Console
I keep getting this issue when trying to call the Claude API in my code.
However, in my Anthropic console it says that the API is working and it's logging each time I press the button to call it. I ...
0
votes
1
answer
217
views
How to stream Claude response with SignalR and Claudia in .Net 6
I'm trying to set up a chat using Claude and SignalR. We're in .Net 6 and currently can't upgrade to .Net 8 at this time. I found Claudia which is supposed to support .Net 6 but the sample code won'...
3
votes
1
answer
5k
views
How to do pdf summarization using claude 3 API on AWS bedrock?
I am trying to use Claude 3 API on AWS Bedrock to do summarizations of posts which may have pdf or images attached along with the text.
def invoke_claude_3_with_text(self, prompt):
client = self....
2
votes
1
answer
3k
views
AWS Bedrock Agent Access Denied with Claude 3
I'm using AWS Bedrock with Pinecone as my vector database, and with Claude 2.1, it works smoothly. Still, when I try to update it (or create a new one) using the recently enabled Claude 3.0 Haiku or ...
1
vote
0
answers
65
views
How do I apply html tags and css to API response in realtime
this may be a dumb question. But I am currently streaming Claudes API response to the front end on one of my applications, and I was wondering the best way to apply styling to the text in real time ...
4
votes
1
answer
15k
views
Could not resolve the foundation model from the provided model identifier
I am experimenting with the Claude models based on this lab: https://github.com/aws-samples/amazon-bedrock-aistylist-lab
I am sending Claude 2 a prompt with 115,551 characters in. So worst case ...