Categorygithub.com/apieat/aigw
repositorypackage
0.1.0
Repository: https://github.com/apieat/aigw.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# README

Aigw

Apieat AI GW

AI Gateway to expose your api to openapi by its function call function. Work as a Microservice, so anyone can deploy it with his site.

function target

  • provide a completion api by wrapping openai completion api
  • transfer completion to openai with function list generated by openapi doc
  • parse openai function call to api calling
  • transfer api result to openai and get the result
  • response the result to user

Usage

config

openai:
  token: your token
api:
  def: ./def.yaml
  base_url: your server's base url

Run this micro-service need a openai token and a openapi definition.

AIGW will transform all your openapi operation to function list which will send will prompt to openai. so when openai response with function_call, AIGW will call your operation as http request.

api

post /completion

content-typeapplication/json (required)
request bodyobject
promptthe prompt which will send to openai to do completion
idrequest id which will send back to original server when openai response

Make a openapi definition

Try our editor online : Apieat

中文用户:百家饭OpenAPI平台