POST
/
api
/
parea
/
v1
/
completion
/
stream
curl --request POST \
  --url https://parea-ai-backend-us-9ac16cdbc7a7b006.onporter.run/api/parea/v1/api/parea/v1/completion/stream \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <api-key>' \
  --data '{
  "end_user_identifier": "2596@gmail.com",
  "inputs": {
    "city": "New York"
  },
  "llm_configuration": {
    "function_call": "auto",
    "functions": [
      {
        "description": "Get the current weather in a given location.",
        "name": "get_current_weather",
        "parameters": {
          "properties": {
            "location": {
              "description": "The city and state, e.g. San Francisco, CA",
              "type": "string"
            },
            "unit": {
              "enum": [
                "celsius",
                "fahrenheit"
              ],
              "type": "string"
            }
          },
          "required": [
            "location"
          ],
          "type": "object"
        }
      }
    ],
    "messages": [
      {
        "content": "What is the weather in New York",
        "role": "user"
      }
    ],
    "model": "gpt-4o-mini",
    "model_params": {
      "max_length": 500,
      "model": "gpt-4o-mini",
      "temp": 0
    },
    "provider": "openai"
  },
  "metadata": {
    "purpose": "testing",
    "user_id": "user_2Q9afRAKe6SZrc3U7"
  },
  "tags": [
    "weather",
    "forecast"
  ]
}'
"<any>"

Authorizations

x-user-id
string
header
required

Body

application/json

Response

200
application/json
Successful Response

The response is of type any.