Skip to content

Commit

Permalink
add seo-score
Browse files Browse the repository at this point in the history
  • Loading branch information
ziodave committed Dec 24, 2023
1 parent 2663979 commit 0ebae12
Show file tree
Hide file tree
Showing 35 changed files with 170 additions and 66 deletions.
3 changes: 2 additions & 1 deletion .bin/regenerate.sh → .bin/rebuild-api.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ npm run docusaurus clean-api-docs long-tail && npm run docusaurus gen-api-docs l
npm run docusaurus clean-api-docs manager && npm run docusaurus gen-api-docs manager
npm run docusaurus clean-api-docs middleware && npm run docusaurus gen-api-docs middleware
npm run docusaurus clean-api-docs sitemap-generator && npm run docusaurus gen-api-docs sitemap-generator
npm run docusaurus clean-api-docs summarizer && npm run docusaurus gen-api-docs summarizer
npm run docusaurus clean-api-docs summarizer && npm run docusaurus gen-api-docs summarizer
npm run docusaurus clean-api-docs seo-score && npm run docusaurus gen-api-docs seo-score
24 changes: 2 additions & 22 deletions .github/workflows/azure-static-web-apps-happy-pebble-0cf31410f.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,8 @@ jobs:

- name: Install Node deps
run: npm install
- name: Rebuild 'analysis' API docs
run: npm run docusaurus clean-api-docs analysis && npm run docusaurus gen-api-docs analysis
- name: Rebuild 'classification' API docs
run: npm run docusaurus clean-api-docs classification && npm run docusaurus gen-api-docs classification
- name: Rebuild 'content-generation' API docs
run: npm run docusaurus clean-api-docs content-generation && npm run docusaurus gen-api-docs content-generation
- name: Rebuild 'events' API docs
run: npm run docusaurus clean-api-docs events && npm run docusaurus gen-api-docs events
- name: Rebuild 'graphql' API docs
run: npm run docusaurus clean-api-docs graphql && npm run docusaurus gen-api-docs graphql
- name: Rebuild 'inspector' API docs
run: npm run docusaurus clean-api-docs inspector && npm run docusaurus gen-api-docs inspector
- name: Rebuild 'long-tail' API docs
run: npm run docusaurus clean-api-docs long-tail && npm run docusaurus gen-api-docs long-tail
- name: Rebuild 'manager' API docs
run: npm run docusaurus clean-api-docs manager && npm run docusaurus gen-api-docs manager
- name: Rebuild 'middleware' API docs
run: npm run docusaurus clean-api-docs middleware && npm run docusaurus gen-api-docs middleware
- name: Rebuild 'sitemap-generator' API docs
run: npm run docusaurus clean-api-docs sitemap-generator && npm run docusaurus gen-api-docs sitemap-generator
- name: Rebuild 'summarizer' API docs
run: npm run docusaurus clean-api-docs summarizer && npm run docusaurus gen-api-docs summarizer
- name: Rebuild API docs
run: ./.bin/rebuild-api.sh

- name: Build And Deploy
id: builddeploy
Expand Down
44 changes: 29 additions & 15 deletions api/seoscore.yaml → api/seo-score.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
openapi: 3.0.0
openapi: 3.0.1
info:
title: SEO Content Analysis API
version: 1.0.0
version: "1.0"
description: This API assesses the match between a URL or text content, a query, and an intent, using advanced SEO techniques.

termsOfService: https://wordlift.io/terms-of-service/
contact:
name: WordLift
url: https://wordlift.io
email: [email protected]
license:
name: (c) copyright 2022-present WordLift
url: https://wordlift.io
servers:
- url: https://api.wordlift.io

tags:
- name: SEO Scores
description: Create a SEO Score

paths:
/score:
post:
summary: Analyze SEO relevance and trustworthiness
operationId: analyzeSEO
tags:
- SEO Analysis
- SEO Scores
summary: Create
operationId: createSEOScore
requestBody:
description: body
required: true
content:
application/json:
schema:
type: object
oneOf:
- required: [url]
- required: [text]
# oneOf:
# - required: [url]
# - required: [text]
properties:
url:
type: string
Expand All @@ -38,7 +50,7 @@ paths:
description: Narrative description of the intent behind the query.
responses:
'200':
description: Analysis result
description: OK
content:
application/json:
schema:
Expand All @@ -50,17 +62,19 @@ paths:
description: Traffic light system indicating the match. M for match, T for trustworthiness, O for overall score.
'400':
description: Bad request
content: { }
'401':
description: Unauthorized
content: { }
'500':
description: Internal server error
content: { }
security:
- ApiKey: []

components:
securitySchemes:
ApiKeyAuth:
ApiKey:
type: apiKey
in: header
name: Authorization

security:
- ApiKeyAuth: []
in: header
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Create new

Created

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"account_id"} required={true} schemaName={"int64"} qualifierMessage={undefined} schema={{"type":"integer","format":"int64","description":"The Account id bound to this Content Generation."}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time","description":"The create date-time.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"deleted"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","default":false,"description":"True if the project has been deleted."}}></SchemaItem><SchemaItem collapsible={false} name={"deleted_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time","description":"The delete date-time.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"graphql_query"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The GraphQL query which will be used to import entity data from the Knowledge Graph."}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"int64"} qualifierMessage={undefined} schema={{"type":"integer","format":"int64","description":"The unique id.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"max_tokens"} required={false} schemaName={"int32"} qualifierMessage={"**Possible values:** `<= 2000`"} schema={{"type":"integer","format":"int32","default":64,"description":"The maximum number of tokens.","maximum":2000,"minimum":0}}></SchemaItem><SchemaItem collapsible={false} name={"model"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** `<= 250 characters`"} schema={{"type":"string","default":"ada","description":"The model name.","maxLength":250,"minLength":0}}></SchemaItem><SchemaItem collapsible={false} name={"modified_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time","description":"The last modified date-time.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `<= 250 characters`"} schema={{"type":"string","description":"The name.","maxLength":250,"minLength":0}}></SchemaItem><SchemaItem collapsible={false} name={"penalty"} required={false} schemaName={"double"} qualifierMessage={"**Possible values:** `>= 0.5` and `<= 1.9`"} schema={{"type":"number","format":"double","default":0.5,"description":"The penalty score.","exclusiveMaximum":false,"exclusiveMinimum":false,"maximum":1.9,"minimum":0.5}}></SchemaItem><SchemaItem collapsible={false} name={"prompt_template"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The prompt template."}}></SchemaItem><SchemaItem collapsible={false} name={"stop"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","default":"###","description":"The stop sequence."}}></SchemaItem><SchemaItem collapsible={false} name={"temperature"} required={false} schemaName={"double"} qualifierMessage={"**Possible values:** `>= 0.4` and `<= 0.8`"} schema={{"type":"number","format":"double","default":0.4,"description":"The temperature score.","exclusiveMaximum":false,"exclusiveMinimum":false,"maximum":0.8,"minimum":0.4}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"account_id\": 0,\n \"created_at\": \"2023-12-19T10:26:37.328Z\",\n \"deleted\": false,\n \"deleted_at\": \"2023-12-19T10:26:37.328Z\",\n \"graphql_query\": \"string\",\n \"id\": 0,\n \"max_tokens\": 64,\n \"model\": \"ada\",\n \"modified_at\": \"2023-12-19T10:26:37.328Z\",\n \"name\": \"string\",\n \"penalty\": 0.5,\n \"prompt_template\": \"string\",\n \"stop\": \"###\",\n \"temperature\": 0.4\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"account_id"} required={true} schemaName={"int64"} qualifierMessage={undefined} schema={{"type":"integer","format":"int64","description":"The Account id bound to this Content Generation."}}></SchemaItem><SchemaItem collapsible={false} name={"created_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time","description":"The create date-time.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"deleted"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","default":false,"description":"True if the project has been deleted."}}></SchemaItem><SchemaItem collapsible={false} name={"deleted_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time","description":"The delete date-time.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"graphql_query"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The GraphQL query which will be used to import entity data from the Knowledge Graph."}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"int64"} qualifierMessage={undefined} schema={{"type":"integer","format":"int64","description":"The unique id.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"max_tokens"} required={false} schemaName={"int32"} qualifierMessage={"**Possible values:** `<= 2000`"} schema={{"type":"integer","format":"int32","default":64,"description":"The maximum number of tokens.","maximum":2000,"minimum":0}}></SchemaItem><SchemaItem collapsible={false} name={"model"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** `<= 250 characters`"} schema={{"type":"string","default":"ada","description":"The model name.","maxLength":250,"minLength":0}}></SchemaItem><SchemaItem collapsible={false} name={"modified_at"} required={false} schemaName={"date-time"} qualifierMessage={undefined} schema={{"type":"string","format":"date-time","description":"The last modified date-time.","readOnly":true}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** `<= 250 characters`"} schema={{"type":"string","description":"The name.","maxLength":250,"minLength":0}}></SchemaItem><SchemaItem collapsible={false} name={"penalty"} required={false} schemaName={"double"} qualifierMessage={"**Possible values:** `>= 0.5` and `<= 1.9`"} schema={{"type":"number","format":"double","default":0.5,"description":"The penalty score.","exclusiveMaximum":false,"exclusiveMinimum":false,"maximum":1.9,"minimum":0.5}}></SchemaItem><SchemaItem collapsible={false} name={"prompt_template"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The prompt template."}}></SchemaItem><SchemaItem collapsible={false} name={"stop"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","default":"###","description":"The stop sequence."}}></SchemaItem><SchemaItem collapsible={false} name={"temperature"} required={false} schemaName={"double"} qualifierMessage={"**Possible values:** `>= 0.4` and `<= 0.8`"} schema={{"type":"number","format":"double","default":0.4,"description":"The temperature score.","exclusiveMaximum":false,"exclusiveMinimum":false,"maximum":0.8,"minimum":0.4}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"account_id\": 0,\n \"created_at\": \"2023-12-24T08:00:14.937Z\",\n \"deleted\": false,\n \"deleted_at\": \"2023-12-24T08:00:14.937Z\",\n \"graphql_query\": \"string\",\n \"id\": 0,\n \"max_tokens\": 64,\n \"model\": \"ada\",\n \"modified_at\": \"2023-12-24T08:00:14.937Z\",\n \"name\": \"string\",\n \"penalty\": 0.5,\n \"prompt_template\": \"string\",\n \"stop\": \"###\",\n \"temperature\": 0.4\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>

Authentication Failure

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The set of errors found for record.

The set of errors found for record.

</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"levelEnum"} required={false} schemaName={"LevelEnum"} qualifierMessage={"**Possible values:** [`RECOMMENDED`, `REQUIRED`]"} schema={{"type":"string","description":"The rule level.","enum":["RECOMMENDED","REQUIRED"],"title":"LevelEnum"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"result"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`PASS`, `FAIL`, `SKIP`, `FIXED`]"} schema={{"type":"string","enum":["PASS","FAIL","SKIP","FIXED"]}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"completion\": \"string\",\n \"content_generation_id\": 0,\n \"data\": {},\n \"errors\": [\n {\n \"levelEnum\": \"RECOMMENDED\",\n \"name\": \"string\",\n \"result\": \"PASS\"\n }\n ],\n \"has_upvote\": true,\n \"id\": 0,\n \"is_accepted\": true,\n \"modified_at\": \"2023-12-19T10:26:37.332Z\",\n \"prompt\": \"string\",\n \"warnings\": [\n {\n \"levelEnum\": \"RECOMMENDED\",\n \"name\": \"string\",\n \"result\": \"PASS\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>
</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"levelEnum"} required={false} schemaName={"LevelEnum"} qualifierMessage={"**Possible values:** [`RECOMMENDED`, `REQUIRED`]"} schema={{"type":"string","description":"The rule level.","enum":["RECOMMENDED","REQUIRED"],"title":"LevelEnum"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"result"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`PASS`, `FAIL`, `SKIP`, `FIXED`]"} schema={{"type":"string","enum":["PASS","FAIL","SKIP","FIXED"]}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"completion\": \"string\",\n \"content_generation_id\": 0,\n \"data\": {},\n \"errors\": [\n {\n \"levelEnum\": \"RECOMMENDED\",\n \"name\": \"string\",\n \"result\": \"PASS\"\n }\n ],\n \"has_upvote\": true,\n \"id\": 0,\n \"is_accepted\": true,\n \"modified_at\": \"2023-12-24T08:00:14.940Z\",\n \"prompt\": \"string\",\n \"warnings\": [\n {\n \"levelEnum\": \"RECOMMENDED\",\n \"name\": \"string\",\n \"result\": \"PASS\"\n }\n ]\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"401"} value={"401"}><div>

Authentication Failure

Expand Down
Loading

0 comments on commit 0ebae12

Please sign in to comment.