diff --git a/specification/DigitalOcean-public.v2.yaml b/specification/DigitalOcean-public.v2.yaml index daa454c36..9a2c7e9c6 100644 --- a/specification/DigitalOcean-public.v2.yaml +++ b/specification/DigitalOcean-public.v2.yaml @@ -1851,6 +1851,7 @@ paths: + /v2/gen-ai/agents: post: $ref: 'resources/gen-ai/genai_create_agent.yml' @@ -1886,12 +1887,12 @@ paths: /v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}: - put: - $ref: 'resources/gen-ai/genai_update_agent_function.yml' - delete: $ref: 'resources/gen-ai/genai_detach_agent_function.yml' + put: + $ref: 'resources/gen-ai/genai_update_agent_function.yml' + /v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}: delete: @@ -1942,15 +1943,15 @@ paths: /v2/gen-ai/anthropic/keys/{api_key_uuid}: + put: + $ref: 'resources/gen-ai/genai_update_anthropic_api_key.yml' + delete: $ref: 'resources/gen-ai/genai_delete_anthropic_api_key.yml' get: $ref: 'resources/gen-ai/genai_get_anthropic_api_key.yml' - put: - $ref: 'resources/gen-ai/genai_update_anthropic_api_key.yml' - /v2/gen-ai/anthropic/keys/{uuid}/agents: get: @@ -2002,15 +2003,15 @@ paths: /v2/gen-ai/knowledge_bases/{uuid}: - put: - $ref: 'resources/gen-ai/genai_update_knowledge_base.yml' - delete: $ref: 'resources/gen-ai/genai_delete_knowledge_base.yml' get: $ref: 'resources/gen-ai/genai_get_knowledge_base.yml' + put: + $ref: 'resources/gen-ai/genai_update_knowledge_base.yml' + /v2/gen-ai/models: get: @@ -2025,8 +2026,6 @@ paths: - - components: securitySchemes: bearer_auth: diff --git a/specification/resources/gen-ai/definitions.yml b/specification/resources/gen-ai/definitions.yml index 45ccf4424..6ee34ec2f 100644 --- a/specification/resources/gen-ai/definitions.yml +++ b/specification/resources/gen-ai/definitions.yml @@ -79,6 +79,8 @@ apiAgent: description: Agent name example: '"example name"' type: string + openai_api_key: + $ref: '#/apiOpenAIAPIKeyInfo' parent_agents: description: Parent agents items: @@ -91,6 +93,8 @@ apiAgent: description: Region code example: '"example string"' type: string + retrieval_method: + $ref: '#/apiRetrievalMethod' route_created_at: description: Creation of route date / time example: "2023-01-01T00:00:00Z" @@ -374,6 +378,8 @@ apiAgentPublic: description: Region code example: '"tor1"' type: string + retrieval_method: + $ref: '#/apiRetrievalMethod' route_created_at: description: Creation of route date / time example: "2021-01-01T00:00:00Z" @@ -789,14 +795,14 @@ apiCreateGuardrailOutput: apiCreateKnowledgeBaseDataSourceInputPublic: description: Data to create a knowledge base data source properties: - file_upload_data_source: - $ref: '#/apiFileUploadDataSource' knowledge_base_uuid: description: Knowledge base id example: '"12345678-1234-1234-1234-123456789012"' type: string spaces_data_source: $ref: '#/apiSpacesDataSource' + web_crawler_data_source: + $ref: '#/apiWebCrawlerDataSource' type: object apiCreateKnowledgeBaseDataSourceOutput: description: Information about a newly created knowldege base data source @@ -863,6 +869,19 @@ apiCreateModelOutput: model: $ref: '#/apiModel' type: object +apiCreateOpenAIAPIKeyInputPublic: + properties: + api_key: + example: '"sk-proj--123456789098765432123456789"' + name: + example: '"Production Key"' +apiCreateOpenAIAPIKeyOutput: + description: CreateOpenAIAPIKeyOutput is used to return the newly created OpenAI + API key. + properties: + api_key_info: + $ref: '#/apiOpenAIAPIKeyInfo' + type: object apiDeleteAgentAPIKeyInputPublic: properties: agent_uuid: @@ -944,6 +963,16 @@ apiDeleteKnowledgeBaseOutput: example: '"123e4567-e89b-12d3-a456-426614174000"' type: string type: object +apiDeleteOpenAIAPIKeyInputPublic: + properties: + api_key_uuid: + example: '"12345678-1234-1234-1234-123456789012"' +apiDeleteOpenAIAPIKeyOutput: + description: DeleteOpenAIAPIKeyOutput is used to return the deleted OpenAI API key. + properties: + api_key_info: + $ref: '#/apiOpenAIAPIKeyInfo' + type: object apiDeployment: description: Description of deployment properties: @@ -1191,6 +1220,15 @@ apiGetModelVersionsInputPublic: properties: name: example: '"My Model"' +apiGetOpenAIAPIKeyInputPublic: + properties: + api_key_uuid: + example: '"12345678-1234-1234-1234-123456789012"' +apiGetOpenAIAPIKeyOutput: + properties: + api_key_info: + $ref: '#/apiOpenAIAPIKeyInfo' + type: object apiGetPreferredRegionOutput: description: Region code of preferred Regions properties: @@ -1381,11 +1419,31 @@ apiIndexedDataSource: description: Uuid of the indexed data source example: '"123e4567-e89b-12d3-a456-426614174000"' type: string + failed_item_count: + description: Total count of files that have failed + example: '"12345"' + format: uint64 + type: string indexed_file_count: description: Total count of files that have been indexed example: '"12345"' format: uint64 type: string + indexed_item_count: + description: Total count of files that have been indexed + example: '"12345"' + format: uint64 + type: string + removed_item_count: + description: Total count of files that have been removed + example: '"12345"' + format: uint64 + type: string + skipped_item_count: + description: Total count of files that have been skipped + example: '"12345"' + format: uint64 + type: string started_at: description: Timestamp when data source started indexing example: "2023-01-01T00:00:00Z" @@ -1782,6 +1840,26 @@ apiListAgentsByAnthropicKeyOutput: meta: $ref: '#/apiMeta' type: object +apiListAgentsByOpenAIKeyInputPublic: + properties: + page: + example: "1" + per_page: + example: "20" + uuid: + example: '"12345678-1234-1234-1234-123456789012"' +apiListAgentsByOpenAIKeyOutput: + description: List of Agents that are linked to a specific OpenAI Key + properties: + agents: + items: + $ref: '#/apiAgent' + type: array + links: + $ref: '#/apiLinks' + meta: + $ref: '#/apiMeta' + type: object apiListAgentsInputPublic: properties: only_deployed: @@ -1945,6 +2023,15 @@ apiListKnowledgeBasePricesOutput: $ref: '#/apiKnowledgeBasePrice' type: array type: object +apiListKnowledgeBasesByDatabaseOutput: + description: List of knowledge bases + properties: + knowledge_bases: + description: The knowledge bases + items: + $ref: '#/apiKnowledgeBase' + type: array + type: object apiListKnowledgeBasesInputPublic: properties: page: @@ -2035,6 +2122,26 @@ apiListModelsOutputPublic: $ref: '#/apiModelPublic' type: array type: object +apiListOpenAIAPIKeysInputPublic: + properties: + page: + example: "1" + per_page: + example: "20" +apiListOpenAIAPIKeysOutput: + description: ListOpenAIAPIKeysOutput is used to return the list of OpenAI API keys + for a specific agent. + properties: + api_key_infos: + description: Api key infos + items: + $ref: '#/apiOpenAIAPIKeyInfo' + type: array + links: + $ref: '#/apiLinks' + meta: + $ref: '#/apiMeta' + type: object apiListRegionsOutput: description: Region Codes properties: @@ -2111,6 +2218,14 @@ apiModel: description: Download url example: '"example string"' type: string + usecases: + description: Usecases of the model + example: + - MODEL_USECASE_AGENT + - MODEL_USECASE_GUARDRAIL + items: + $ref: '#/apiModelUsecase' + type: array uuid: description: Unique id example: '"123e4567-e89b-12d3-a456-426614174000"' @@ -2140,6 +2255,7 @@ apiModelProvider: enum: - MODEL_PROVIDER_DIGITALOCEAN - MODEL_PROVIDER_ANTHROPIC + - MODEL_PROVIDER_OPENAI example: MODEL_PROVIDER_DIGITALOCEAN type: string apiModelPublic: @@ -2198,12 +2314,14 @@ apiModelUsecase: - MODEL_USECASE_FINETUNED: The model maybe used for fine tuning - MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models) - MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails + - MODEL_USECASE_REASONING: The model usecase for reasoning enum: - MODEL_USECASE_UNKNOWN - MODEL_USECASE_AGENT - MODEL_USECASE_FINETUNED - MODEL_USECASE_KNOWLEDGEBASE - MODEL_USECASE_GUARDRAIL + - MODEL_USECASE_REASONING example: MODEL_USECASE_UNKNOWN type: string apiModelVersion: @@ -2225,6 +2343,43 @@ apiModelVersion: format: int64 type: integer type: object +apiOpenAIAPIKeyInfo: + description: OpenAI API Key Info + properties: + created_at: + description: Key creation date + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + created_by: + description: Created by user id from DO + example: '"12345"' + format: uint64 + type: string + deleted_at: + description: Key deleted date + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + models: + description: Models supported by the openAI api key + items: + $ref: '#/apiModel' + type: array + name: + description: Name + example: '"example name"' + type: string + updated_at: + description: Key last updated date + example: "2023-01-01T00:00:00Z" + format: date-time + type: string + uuid: + description: Uuid + example: '"123e4567-e89b-12d3-a456-426614174000"' + type: string + type: object apiPages: description: Information about how to reach other pages properties: @@ -2316,6 +2471,22 @@ apiResourceUsage: format: date-time type: string type: object +apiRetrievalMethod: + default: RETRIEVAL_METHOD_UNKNOWN + description: |- + - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown + - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite + - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back + - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries + - RETRIEVAL_METHOD_NONE: The retrieval method is none + enum: + - RETRIEVAL_METHOD_UNKNOWN + - RETRIEVAL_METHOD_REWRITE + - RETRIEVAL_METHOD_STEP_BACK + - RETRIEVAL_METHOD_SUB_QUERIES + - RETRIEVAL_METHOD_NONE + example: RETRIEVAL_METHOD_UNKNOWN + type: string apiSpacesDataSource: description: Spaces Bucket Data Source properties: @@ -2541,6 +2712,8 @@ apiUpdateAgentInputPublic: description: The id of the DigitalOcean project this agent will belong to example: '"12345678-1234-1234-1234-123456789012"' type: string + retrieval_method: + $ref: '#/apiRetrievalMethod' tags: description: A set of abitrary tags to organize your agent example: @@ -2712,6 +2885,20 @@ apiUpdateModelMetadataOutput: model: $ref: '#/apiModel' type: object +apiUpdateOpenAIAPIKeyInputPublic: + properties: + api_key: + example: '"sk-ant-12345678901234567890123456789012"' + api_key_uuid: + example: '"12345678-1234-1234-1234-123456789012"' + name: + example: '"Production Key"' +apiUpdateOpenAIAPIKeyOutput: + description: UpdateOpenAIAPIKeyOutput is used to return the updated OpenAI API key. + properties: + api_key_info: + $ref: '#/apiOpenAIAPIKeyInfo' + type: object apiUsageMeasurement: description: Usage Measurement Description properties: diff --git a/specification/resources/gen-ai/examples/curl/genai_create_openai_api_key.yml b/specification/resources/gen-ai/examples/curl/genai_create_openai_api_key.yml new file mode 100644 index 000000000..b0ca715db --- /dev/null +++ b/specification/resources/gen-ai/examples/curl/genai_create_openai_api_key.yml @@ -0,0 +1,10 @@ +lang: cURL +source: |- + curl -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PREVIEW_API_TOKEN" \ + "https://api.digitalocean.com/v2/gen-ai/openai/keys" \ + -d '{ + "api_key": "sk-proj--12345678901234567890123456789012", + "name": "test-key" + }' diff --git a/specification/resources/gen-ai/examples/curl/genai_delete_openai_api_key.yml b/specification/resources/gen-ai/examples/curl/genai_delete_openai_api_key.yml new file mode 100644 index 000000000..716558681 --- /dev/null +++ b/specification/resources/gen-ai/examples/curl/genai_delete_openai_api_key.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X DELETE \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PREVIEW_API_TOKEN" \ + "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" diff --git a/specification/resources/gen-ai/examples/curl/genai_get_openai_api_key.yml b/specification/resources/gen-ai/examples/curl/genai_get_openai_api_key.yml new file mode 100644 index 000000000..3b91b6e2b --- /dev/null +++ b/specification/resources/gen-ai/examples/curl/genai_get_openai_api_key.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PREVIEW_API_TOKEN" \ + "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" diff --git a/specification/resources/gen-ai/examples/curl/genai_list_agents_by_openai_key.yml b/specification/resources/gen-ai/examples/curl/genai_list_agents_by_openai_key.yml new file mode 100644 index 000000000..3ab88decf --- /dev/null +++ b/specification/resources/gen-ai/examples/curl/genai_list_agents_by_openai_key.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PREVIEW_API_TOKEN" \ + "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents" diff --git a/specification/resources/gen-ai/examples/curl/genai_list_openai_api_keys.yml b/specification/resources/gen-ai/examples/curl/genai_list_openai_api_keys.yml new file mode 100644 index 000000000..33db23cf3 --- /dev/null +++ b/specification/resources/gen-ai/examples/curl/genai_list_openai_api_keys.yml @@ -0,0 +1,6 @@ +lang: cURL +source: |- + curl -X GET \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PREVIEW_API_TOKEN" \ + "https://api.digitalocean.com/v2/gen-ai/openai/keys" diff --git a/specification/resources/gen-ai/examples/curl/genai_update_openai_api_key.yml b/specification/resources/gen-ai/examples/curl/genai_update_openai_api_key.yml new file mode 100644 index 000000000..a2a7537d9 --- /dev/null +++ b/specification/resources/gen-ai/examples/curl/genai_update_openai_api_key.yml @@ -0,0 +1,10 @@ +lang: cURL +source: |- + curl -X PUT \ + -H "Content-Type: application/json" \ + -H "Authorization: Bearer $PREVIEW_API_TOKEN" \ + "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \ + -d '{ + "api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4", + "name": "test-key2" + }' diff --git a/specification/resources/gen-ai/genai_list_models.yml b/specification/resources/gen-ai/genai_list_models.yml index 4cc7143a3..3ec45575c 100644 --- a/specification/resources/gen-ai/genai_list_models.yml +++ b/specification/resources/gen-ai/genai_list_models.yml @@ -9,6 +9,7 @@ parameters: - MODEL_USECASE_FINETUNED: The model maybe used for fine tuning - MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models) - MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails + - MODEL_USECASE_REASONING: The model usecase for reasoning example: - MODEL_USECASE_UNKNOWN in: query @@ -21,6 +22,7 @@ parameters: - MODEL_USECASE_FINETUNED - MODEL_USECASE_KNOWLEDGEBASE - MODEL_USECASE_GUARDRAIL + - MODEL_USECASE_REASONING type: string type: array - description: Only include models that are publicly available. diff --git a/specification/resources/gen-ai/genai_update_agent_deployment_visibility.yml b/specification/resources/gen-ai/genai_update_agent_deployment_visibility.yml index 10d82cf41..8aa438ace 100644 --- a/specification/resources/gen-ai/genai_update_agent_deployment_visibility.yml +++ b/specification/resources/gen-ai/genai_update_agent_deployment_visibility.yml @@ -1,4 +1,4 @@ -description: Check whether an agent is public or private. To get the agent status, +description: Check whether an agent is public or private. To update the agent status, send a PUT request to `/v2/gen-ai/agents/{uuid}/deployment_visibility`. operationId: genai_update_agent_deployment_visibility parameters: @@ -41,7 +41,7 @@ responses: security: - bearer_auth: - genai:update -summary: Check Agent Status +summary: Update Agent Status tags: - GenAI Platform (Public Preview) x-codeSamples: