Skip to content

Commit

Permalink
add entities example
Browse files Browse the repository at this point in the history
  • Loading branch information
ctrl-alt-lulz committed Mar 2, 2024
1 parent 7d1625b commit cdba3dc
Show file tree
Hide file tree
Showing 20 changed files with 598 additions and 88 deletions.
1 change: 0 additions & 1 deletion .github/workflows/zeusfyi_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ jobs:
--token ${{ secrets.DEPOT_TOKEN }} \
--provenance=false \
-f docker/docusaurus/Dockerfile . --push
220 changes: 149 additions & 71 deletions .openapi/mockingbird.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Mockingbird API
version: "1.0.2-beta.rc0"
version: "1.0.3-beta.rc0"
servers:
- url: https://api.zeus.fyi/v1
paths:
Expand Down Expand Up @@ -48,6 +48,8 @@ paths:
type: array
items:
$ref: '#/components/schemas/TriggerAction'
'412':
description: Precondition failed
'400':
description: Bad request
'500':
Expand All @@ -74,6 +76,8 @@ paths:
properties:
message:
type: string
'412':
description: Precondition failed
'400':
description: Bad request due to invalid input or missing request body
'500':
Expand Down Expand Up @@ -121,6 +125,8 @@ paths:
type: array
items:
$ref: '#/components/schemas/RetrievalItem'
'412':
description: Precondition failed
'400':
description: Bad request due to invalid input
'500':
Expand All @@ -147,6 +153,8 @@ paths:
properties:
message:
type: string
'412':
description: Precondition failed
'400':
description: Bad request due to invalid input
'500':
Expand All @@ -173,6 +181,8 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/EvalFn'
'412':
description: Precondition failed
'400':
description: Bad request due to invalid input
'404':
Expand Down Expand Up @@ -221,6 +231,8 @@ paths:
properties:
message:
type: string
'412':
description: Precondition failed
'400':
description: Bad request due to invalid input
'500':
Expand Down Expand Up @@ -268,6 +280,8 @@ paths:
type: array
items:
$ref: '#/components/schemas/AITaskLibrary'
'412':
description: Precondition failed
'400':
description: Bad Request
'500':
Expand All @@ -292,6 +306,8 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/AITaskLibrary'
'412':
description: Precondition failed
'400':
description: Bad Request
'500':
Expand Down Expand Up @@ -331,6 +347,8 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/JsonSchemaDefinition'
'412':
description: Precondition failed
'400':
description: Invalid input
'500':
Expand Down Expand Up @@ -391,6 +409,12 @@ paths:
responses:
'200':
description: Successful response
'400':
description: Bad request
'412':
description: Precondition failed
'500':
description: Internal server error
/run/ai/{id}:
get:
summary: Get Run by ID
Expand All @@ -413,6 +437,10 @@ paths:
$ref: '#/components/schemas/OrchestrationsAnalysis'
'404':
description: Run not found
'412':
description: Precondition failed
'500':
description: Internal server error
/runs/ai:
get:
summary: Workflow Runs
Expand Down Expand Up @@ -455,60 +483,92 @@ paths:
description: Bad Request
'500':
description: Server Error

/search/entities/ai:
post:
summary: Search Entities
operationId: searchEntities
tags:
- Search
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EntitiesFilter'
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EntitiesFilter'
/entity/ai:
post:
summary: Create or update an entity
operationId: createOrUpdateEntity
tags:
- Entities
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/EntitiesFilter'
responses:
'200':
description: Entity created or updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/EntitiesFilter'
'400':
description: Bad request
'412':
description: Precondition failed
'500':
description: Internal server error
/entities/ai:
post:
summary: Create or update entities
operationId: createOrUpdateEntities
tags:
- Entities
requestBody:
required: true
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EntitiesFilter'
responses:
'200':
description: Entities created or updated successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/EntitiesFilter'
'400':
description: Bad request
'412':
description: Precondition failed
'500':
description: Internal server error
components:
schemas:
CreateOrUpdateRetrievalRequest:
type: object
properties:
RetrievalItem:
$ref: '#/components/schemas/RetrievalItem'
CreateOrUpdateEvalsRequest:
type: object
properties:
EvalFn:
$ref: '#/components/schemas/EvalFn'
OrchestrationsAnalysis:
type: object
properties:
totalWorkflowTokenUsage:
type: integer
runCycles:
type: integer
aggregatedData:
type: array
items:
$ref: '#/components/schemas/AggregatedData'
aggregatedEvalResults:
type: array
items:
$ref: '#/components/schemas/EvalMetric'
orchestration:
$ref: '#/components/schemas/Orchestrations'
Orchestrations:
type: object
properties:
orchestrationStrID:
type: string
orchestrationID:
type: integer
active:
type: boolean
groupName:
type: string
type:
type: string
instructions:
type: string
orchestrationName:
type: string
EntitiesFilter:
type: object
properties:
nickname:
type: string
nullable: true
platform:
type: string
nullable: true
firstName:
type: string
nullable: true
Expand All @@ -519,6 +579,7 @@ components:
type: array
items:
type: string
nullable: true
metadataJsonb:
type: string
format: byte
Expand All @@ -528,16 +589,11 @@ components:
nullable: true
sinceUnixTimestamp:
type: integer
format: int64
nullable: true
required:
- nickname
- platform
- labels
UserEntity:
type: object
properties:
entityId:
type: integer
nickname:
type: string
platform:
Expand All @@ -548,21 +604,16 @@ components:
lastName:
type: string
nullable: true
mdSlice:
metadata:
type: array
items:
$ref: '#/components/schemas/UserEntityMetadata'
required:
- entityId
- nickname
- platform
UserEntityMetadata:
type: object
properties:
entityMetadataId:
type: integer
entityId:
type: integer
jsonData:
type: string
format: byte
Expand All @@ -573,24 +624,51 @@ components:
labels:
type: array
items:
$ref: '#/components/schemas/UserEntityMetadataLabel'
required:
- entityMetadataId
- entityId

UserEntityMetadataLabel:
type: string
CreateOrUpdateRetrievalRequest:
type: object
properties:
entityMetadataLabelId:
RetrievalItem:
$ref: '#/components/schemas/RetrievalItem'
CreateOrUpdateEvalsRequest:
type: object
properties:
EvalFn:
$ref: '#/components/schemas/EvalFn'
OrchestrationsAnalysis:
type: object
properties:
totalWorkflowTokenUsage:
type: integer
entityMetadataId:
runCycles:
type: integer
label:
aggregatedData:
type: array
items:
$ref: '#/components/schemas/AggregatedData'
aggregatedEvalResults:
type: array
items:
$ref: '#/components/schemas/EvalMetric'
orchestration:
$ref: '#/components/schemas/Orchestrations'
Orchestrations:
type: object
properties:
orchestrationStrID:
type: string
orchestrationID:
type: integer
active:
type: boolean
groupName:
type: string
type:
type: string
instructions:
type: string
orchestrationName:
type: string
required:
- entityMetadataLabelId
- entityMetadataId
- label
AggregatedData:
type: object
properties:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GOMODCACHE := $(shell go env GOMODCACHE)
GOCACHE := $(shell go env GOCACHE)
GOOS := linux
GOARCH := amd64
VERSION := 1.0.2-beta.rc0
VERSION := 1.0.3-beta.rc0

# hercules build info
REPO := zeusfyi
Expand Down
Loading

0 comments on commit cdba3dc

Please sign in to comment.