ai

package
v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ai AI

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Recognize

func Recognize(ctx *dingding.App, payload []byte) (resp []byte, err error)

OCR文字识别

See: https://ding-doc.dingtalk.com/doc#/serverapi2/so7gg5

POST https://oapi.dingtalk.com/topapi/ocr/structured/recognize?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/ai"
)

func main() {
	var ctx *dingding.App

	payload := []byte("{}")
	resp, err := ai.Recognize(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func Translate

func Translate(ctx *dingding.App, payload []byte) (resp []byte, err error)

文本翻译

See: https://ding-doc.dingtalk.com/doc#/serverapi2/cvcp9r

POST https://oapi.dingtalk.com/topapi/ai/mt/translate?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/dingding"
	"github.com/fastwego/dingding/apis/ai"
)

func main() {
	var ctx *dingding.App

	payload := []byte("{}")
	resp, err := ai.Translate(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL