LLM Proxy
Stream Completion
LLM Proxy
Stream Completion
Get a completion response using either one of your organization’s deployed prompts, or by providing completion details including prompt and inputs in the request.
This endpoint acts as a LLM gateway/proxy endpoint to generate completions from different LLMs.
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
Body
application/json
Response
200
application/json
Successful Response
The response is of type any
.
Was this page helpful?
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>"