v1

latestOpenAPI 3.1.02026-08-06192355.6 KB
Agents

Create Agent

post/api/v1/agent

Headers

CodeGPT-Org-Idstring

Organization ID that agents and documents belong to.

Request body

namestring required

Name of the agent

topkinteger nullable

Number of elements to retrieve from the documents

temperaturenumber nullable

Temperature of the agent

modelstring nullable

Model of the agent

promptstring nullable

Agent prompt

welcomestring nullable

Welcome message of the agent

Example request

{
  "name": "Agent 1",
  "topk": 3,
  "temperature": 0.7,
  "model": "gpt-3.5-turbo",
  "prompt": "I want you to act like a helpful assistant and answer the following questions.",
  "welcome": "Hello, how can I help you?"
}

Response

Successful Response

{"stackTrail":"paths:/api/v1/agent:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}