v1

latestOpenAPI 3.1.02026-08-06192355.6 KB
Agents

Update Agent

patch/api/v1/agent/{id}

Path parameters

idstring required

Headers

CodeGPT-Org-Idstring

Organization ID that agents and documents belong to.

Request body

namestring nullable

Name of the agent

modelstring nullable

Model of the agent

temperaturenumber nullable

Temperature of the agent

promptstring nullable

Prompt of the agent

topkinteger nullable

Number of elements to retrieve from the documents

welcomestring nullable

Welcome message of the agent

is_publicboolean

Whether the agent can be seen and used by any user or not

pincodestring

Code required for using a shared agent

Example request

{
  "name": "Agent 1",
  "model": "gpt-3.5-turbo",
  "temperature": 0.7,
  "prompt": "You are a helpful assistant",
  "topk": 3,
  "welcome": "Hello, how can I help you?",
  "pincode": "false"
}

Response

Successful Response

idstring

Agent id

org_idstring

ID of the Organization the agent belongs to

created_atstring date-time

Date when the agent was created

agent_type'qa' | 'other'

Type of the agent

namestring nullable

Name of the agent

descriptionstring nullable

Description of the agent

imagestring nullable

Image of the agent in chat

promptstring nullable

Prompt 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

welcomestring nullable

Welcome message of the agent

is_publicboolean

Whether the agent can be seen and used by any user or not

pincodestring

Code required for using a shared agent

agent_documentsstring[]

List of document ids

Example response

{
  "id": "0000-0000-0000-0000",
  "org_id": "0000-0000-0000-0000",
  "created_at": "2023-01-01T12:00:00.000Z",
  "agent_type": "other",
  "name": "Agent 1",
  "description": "Description of the agent",
  "image": "null",
  "prompt": "You are a helpful assistant",
  "topk": 3,
  "temperature": 0.7,
  "model": "gpt-3.5-turbo",
  "welcome": "Hello, how can I help you?",
  "pincode": "false",
  "agent_documents": [
    "0000-0000-0000-0000"
  ]
}