Hello everyone,
I am tearing my hair out trying to figure out how to make this custom app work. I had it working with the api if I did all the parameters manually instead of having an array of collections. I thought I finally got it to generate the JSON for communication correctly but it keeps coming back malformed. I have even tried using postman to check my sanity and using the input bundle from the failed run in make as the data section of the POST call in postman removing the outside works perfectly. I just can’t figure out how to get it to work in make. I know I am so close missing something small but just can’t find it, anyone else have any insights?
sample curl in postman:
curl -X POST “https://api.groq.com/openai/v1/chat/completions”
-H “Authorization: Bearer ”
-H “Content-Type: application/json”
-d ’ {
“model”: “mixtral-8x7b-32768”,
“messages”: [
{
“role”: “system”,
“content”: “you are a recruiter.”
},
{
“role”: “user”,
“content”: “What jobs are you looking to fill?”
}
],
“max_tokens”: 4096,
“temperature”: 0.7
}
’
input bundle:
[
{
"model": "mixtral-8x7b-32768",
"messages": [
{
"role": "system",
"content": "you are a recruiter."
},
{
"role": "user",
"content": "What jobs are you looking to fill?"
}
],
"max_tokens": 4096,
"temperature": 0.7
}
]
Module Communication:
{
“url”: “/chat/completions”,
“method”: “POST”,
“body”: {
“iterate”: “{{parameters.messages}}”,
“messages”:
[
{“role”: “{{item.role}}” , “content”: “{{item.content}}”}
]
“model”: “{{parameters.model}}”,
“temperature”: “{{parameters.temperature}}”,
“max_tokens”: “{{parameters.max_tokens}}”,
“top_p”: “{{parameters.top_p}}”,
“stop”: “{{parameters.stop}}”
}
}
If you need any other information please let me know. Also does anyone know why the ordering of items in the input bundle are different than as spelled out in the communications code section?