I have the below template; however, when I try to query dynamic values from the same table, they aren’t pulling. I’ve checked the docs and videos but still no luck. Thoughts?
in this simple test yes it does work, but its like any time I put in the $ it basically breaks it. Is it because I’m trying to pass dynamic data within the “” for the original JSON message?
I took those out just in case and still the same issue.
I’m trying to pass dynamic content into the text of the prompt I’m sending to Anthropic’s API. I’m 99% certain its because I put the data in “”, so then when I try to pass dynamic variables into the literal text, it wont make it dynamic, but unsure how you would pass dynamic content within a json request unless I remove the “”?
The issue is if I remove the “” it breaks the json template
The problem if you just paste the JSON without using the back ticks is that all the double quotes get converted to smart quotes, and it breaks the JSON. This makes it harder for anyone that is trying to help you.
Use this option to paste your code in order to avoid some invalid characters like your “ ”.
You must use these instead: " "
Did you see the difference?
Thank you!! Here is the current simplified version that I have but still cant get dynamic content in
{
“model”: “claude-3-opus-20240229”,
“max_tokens”: 1000,
“system”: “You are an AI assistant tasked with classifying users based on provided information.”,
“messages”: [
{
“role”: “user”,
“content”: “Tell me how you would classify this user in 10 words or less as a person Gender:$gender”
}
]
}
{
"model": "claude-3-opus-20240229",
"max_tokens": 1000,
"system": "You are an AI assistant tasked with classifying users based on provided information.",
"messages": [
{
"role": "user",
"content": "Tell me how you would classify this user in 10 words or less as a person Gender:$gender"
}
]
}
Also, the $gender binder here can’t work if you are trying to have that inside double quotes. It seems like you can only tie values/objects directly to a variable, not inside another value like that. If you want to do that, using a template column before that, just for that value, is the way to go.