Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Lang.ai Connector #853

Merged
merged 3 commits into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
  • Loading branch information
evicentem9 authored Jun 7, 2021
commit 40118f57d161d39ac6843c768607f9a2c4ab00a7
117 changes: 63 additions & 54 deletions certified-connectors/Lang-ai/apiDefinition.swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@
"properties": {
"id": {
"type": "string",
"description": "id",
"description": "The ID of the tag.",
"title": "Tag Id"
},
"name": {
"type": "string",
"description": "name",
"description": "The name of the tag.",
"title": "Tag Name"
}
}
},
"description": "tags"
"description": "An array of tags."
},
"intents": {
"type": "array",
Expand All @@ -55,19 +55,19 @@
"properties": {
"name": {
"type": "string",
"description": "name",
"description": "The name of the intent.",
"title": "Intent Name"
},
"features": {
"type": "array",
"items": {
"type": "string"
},
"description": "features"
"description": "An array of features. The sign “>” indicates a second-level feature."
}
}
},
"description": "intents"
"description": "An array of intents."
}
}
}
Expand All @@ -88,7 +88,7 @@
"default": "application/json",
"x-ms-visibility": "internal",
"x-ms-summary": "Content-Type",
"description": "Content-Type"
"description": "Content-Type header value has to be set to application/json."
},
{
"name": "body",
Expand All @@ -99,12 +99,12 @@
"properties": {
"text": {
"type": "string",
"description": "text",
"description": "The text to be classified.",
"title": "Text to analyze"
},
"projectId": {
"type": "string",
"description": "projectId",
"description": "The project to be used to classify the text.",
"title": "Project ID"
}
},
Expand All @@ -125,7 +125,7 @@
],
"responses": {
"200": {
"description": "default",
"description": "OK",
"schema": {
"type": "object",
"properties": {
Expand All @@ -136,17 +136,17 @@
"properties": {
"id": {
"type": "string",
"description": "id",
"description": "The ID of the tag.",
"title": "Tag Id"
},
"name": {
"type": "string",
"description": "name",
"description": "The name of the tag.",
"title": "Tag Name"
}
}
},
"description": "tags"
"description": "An array of tags."
},
"intents": {
"type": "array",
Expand All @@ -155,19 +155,19 @@
"properties": {
"name": {
"type": "string",
"description": "name",
"description": "The name of the intent.",
"title": "Intent Name"
},
"features": {
"type": "array",
"items": {
"type": "string"
},
"description": "features"
"description": "The list of features. The sign “>” indicates a second-level feature."
}
}
},
"description": "intents"
"description": "An array of intents."
}
}
}
Expand All @@ -188,7 +188,7 @@
"type": "string",
"default": "application/json",
"x-ms-visibility": "internal",
"description": "Content-Type",
"description": "Content-Type header value has to be set to application/json.",
"x-ms-summary": "Content-Type"
},
{
Expand All @@ -200,12 +200,12 @@
"properties": {
"text": {
"type": "string",
"description": "text",
"description": "The text to be classified.",
"title": "Text to save"
},
"projectId": {
"type": "string",
"description": "projectId",
"description": "The project to be used to classify the text.",
"title": "Project ID",
"x-ms-dynamic-values": {
"operationId": "Projects",
Expand All @@ -215,9 +215,17 @@
},
"date": {
"type": "string",
"description": "date",
"description": "The date of the document. It supports valid IS0 8601 dates. If not passed, the request time is used.",
"title": "Date",
"format": "date-time"
},
"metadata": {
"type": "object",
"description": "The metadata information of the document. Object parameter. \"Key\":\"Value\" format",
"title": "Metadata",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
Expand All @@ -233,30 +241,30 @@
"get": {
"responses": {
"200": {
"description": "default",
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "status",
"description": "The project status: Errored, Processing, Completed.",
"title": "Status"
},
"id": {
"type": "string",
"description": "id",
"description": "The ID of the project.",
"title": "Project ID"
},
"name": {
"type": "string",
"description": "name",
"description": "The name of the project.",
"title": "Project Name"
},
"createdAt": {
"type": "string",
"description": "createdAt",
"description": "The creation date of the project.",
"title": "Project created at",
"format": "date-time"
}
Expand Down Expand Up @@ -288,28 +296,28 @@
"get": {
"responses": {
"200": {
"description": "default",
"description": "OK",
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string",
"description": "status",
"description": "The project status: Errored, Processing, Completed.",
"title": "Status"
},
"id": {
"type": "string",
"description": "id",
"description": "The ID of the project.",
"title": "Project ID"
},
"name": {
"type": "string",
"description": "name",
"description": "The name of the project.",
"title": "Project Name"
},
"createdAt": {
"type": "string",
"description": "createdAt",
"description": "The creation date of the project.",
"title": "Project Created At",
"format": "date-time"
},
Expand All @@ -320,34 +328,34 @@
"properties": {
"id": {
"type": "string",
"description": "id",
"description": "The ID of the tag.",
"title": "Tag ID"
},
"name": {
"type": "string",
"description": "name",
"description": "The name of the tag.",
"title": "Tag Name"
},
"createdAt": {
"type": "string",
"description": "createdAt",
"description": "The creation date of the tag.",
"title": "Tag Created At",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"description": "updatedAt",
"description": "The last update date of the tag.",
"title": "Tag Updated At",
"format": "date-time"
},
"isDraft": {
"type": "boolean",
"description": "isDraft",
"description": "Whether or not the tag is draft.",
"title": "isDraft"
}
}
},
"description": "tags"
"description": "An array of tags."
}
}
}
Expand All @@ -371,7 +379,7 @@
"value-path": "id",
"value-title": "name"
},
"description": "ProjectID",
"description": "The project to be used to retrieve the tags.",
"x-ms-summary": "ProjectID",
"x-ms-url-encoding": "single"
},
Expand All @@ -382,27 +390,14 @@
"type": "string",
"default": "application/json",
"x-ms-visibility": "internal",
"description": "Content-Type",
"description": "Content-Type header value has to be set to application/json.",
"x-ms-summary": "Content-Type"
}
]
}
}
},
"/api/v1/project": {}
},
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://lang.ai"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://lang.ai/legal/privacy"
},
{
"propertyName": "Categories",
"propertyValue": "AI;Productivity"
}
],
"definitions": {},
"parameters": {},
"responses": {},
Expand All @@ -418,5 +413,19 @@
"API Key": []
}
],
"tags": []
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://lang.ai"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://lang.ai/legal/privacy"
},
{
"propertyName": "Categories",
"propertyValue": "AI;Productivity"
}
]
}
40 changes: 30 additions & 10 deletions certified-connectors/Lang-ai/readme.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,40 @@

# Lang.ai Connector

Lang.ai connector supercharges your customer service platform by automating time-consuming manual tasks like tagging, prioritization and routing.
Lang.ai supercharges your customer service platform by automating time-consuming manual tasks like tagging, prioritization and routing.
Unsupervised AI that literally takes minutes to implement as you build your tags combining concepts visually instead of spending months using a traditional AI approach.

Lang.ai connector provides a powerful REST API. Using this API, you can send new texts to an specific project in Lang.ai to analyze, retrieve list of projects from your Lang.ai account and list all the tags in one specific project.


## Prerequisites
You will need the following to proceed:
* A Lang.ai susbscription (API token)
* At least 1 project created in Lang.ai vía web platform

You will need a Lang.ai account (token) to be able to use this connector and automate text workflows with it.
Also, you will need to create a project with your historical data by using lang.ai web platform.

## How to get credentials?
* Contact Lang.ai representatives by requesting a demo at https://lang.ai/demo
* Send a message to sales@lang.ai asking for an access, our team will get back to you as soon as possible.
* Once you’ve subscribed to Lang.ai, you’ll be able to generate a token to use for the connector.

## Set up a project in Lang.ai
In order to use Lang.ai connector to automate the analysis in your text processes, you will need to follow these steps:

1. Create a project
You will need to create a project in Lang.ai uploading a dataset with your historical data, using Lang.ai web platform. You can read more about this [here](https://help.lang.ai/en/articles/2694436-creating-projects-and-uploading-datasets)

2. Create classification model and tags
Once you have uploaded the data, it's time to create a classification model to analyze new text in real-time. This must be done using Tags. You can read more about this [here](https://help.lang.ai/en/articles/3175538-using-tags)

3. Connect and analyze in real-time
In order to connect your own classification model wiht your text process you will need to create an API token to use it. You can generate an API token in `Settings > Channels > API > Token Access`

## Supported Operations
The connector supports the following operations:
* `Analyze documents`: Returns the classification for a given document and the specified project.
* `Save documents`: Saves a given document into the specified project. It supports passing metadata that can be later used in the project's Dashboard. New metadata values passed via API will be available to use in the project's setup section.
* `List projects`: Returns the list of projects.
* `List project tags`: Returns the list of the project's tags.


- Contact Lang.ai representatives by requesting a demo at https://lang.ai/demo
- Send a message to sales@lang.ai asking for an access, our team will get back to you as soon as possible.
- Once you’ve subscribed to Lang.ai, you’ll be able to generate a token to use for the connector.

## Known issues and limitations

- For the moment, Project creation action has to be made using Lang.ai's web platform. Once the project is created, you can use this connector to send new texts to analyze.