- Регистрация
- 13.06.2016
- Сообщения
- 12
- Благодарностей
- 2
- Баллы
- 3
I have seen several threads about this subject but no real final conclusion.
I have managed to get it to the point of sending the post request, but when using a variable the JSON is malformed.
I get this:
{
"error": {
"message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
Without the variable placeholder it sends the request. Any ideas on how to get this working?
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant. Your task is to extract information from the given text."
},
{
"role": "user",
"content": "Find the first and last name in this text: {-Variable.prompt-}" (I have tried wording this many different ways)
}
],
"temperature": 0.5,
"max_tokens": 3200
}
I have managed to get it to the point of sending the post request, but when using a variable the JSON is malformed.
I get this:
{
"error": {
"message": "We could not parse the JSON body of your request. (HINT: This likely means you aren't using your HTTP library correctly. The OpenAI API expects a JSON payload, but what was sent was not valid JSON. If you have trouble figuring out how to fix this, please contact us through our help center at help.openai.com.)",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
Without the variable placeholder it sends the request. Any ideas on how to get this working?
{
"model": "gpt-4",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant. Your task is to extract information from the given text."
},
{
"role": "user",
"content": "Find the first and last name in this text: {-Variable.prompt-}" (I have tried wording this many different ways)
}
],
"temperature": 0.5,
"max_tokens": 3200
}