#API NOT WORKING

1 messages · Page 1 of 1 (latest)

random sluice
#

OMG i am getting legit trolled right now

The request is working perfectly fine in postman

I copy pasted what i get from my jsonString

var response = await _client.PostAsJsonAsync("chat/completions", jsonString);

which equates to

{
  "model": "gpt-3.5-turbo-0613",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful Assistant named Marv that likes to add friendly opinions with information"
    },
    {
      "role": "user",
      "content": "What is the weather like in toronto"
    },
    {
      "role": "user",
      "content": "What is the weather like in toronto"
    }
  ],
  "functions": [
    {
      "name": "get_current_weather",
      "description": "Get the current weather in a given location",
      "parameters": {
        "type": "object",
        "properties": {
          "location": {
            "type": "string",
            "description": "The city and state, e.g. San Francisco, CA"
          },
          "unit": {
            "type": "string",
            "enum": [
              "celsius",
              "fahrenheit"
            ]
          }
        },
        "required": [
          "location"
        ]
      }
    }
  ],
  "function_call": "auto"
}

but the response i get when i do is bad request.

see images in postman the same exact request works