0.0.20 • Published 1 year ago
oute-services-prompt-sdk v0.0.20
This module expose helper functions
- Initialization
params = {
url: @server url
token: @access token
}
Prompt = require("oute-services-prompt-sdk")
prompt_instance = new Prompt(params)
Cache functions
Core functions
- Save
body = {
"name": "test 1",
"template": "give me info for \#{{title}}# and \#{{max_count}}#",
"inputs": [{
"key": "title",
"type": "STRING",
"default": null,
"required": true
},{
"key": "max_count",
"type": "NUMBER",
"default": 9999,
"required": false
}]
}
await prompt_instance.save(body)
- Find One
query = {
"_id": "UvuPE2PGn"
}
await prompt_instance.findOne(query)
- execute
body = {
"query": "test", //Send either query or prompt_id with state
// "prompt_id": "YxeFhvcnt",
// "state": {
// "title": "Testing",
// "max_count": 30
// },
"authorization": "", //This will be dynamic for users
"key": "", //This will be dynamic for users
// "response_type": "stream", //Send if required as stream or don't set this key. Use only when generate_type is Text
"generate_type": "Image", //Send either Text or Image
"image_size": "256x256", //Use only when generate_type is Text, Image size available '256x256', '512x512', '1024x1024', '1024x1792', '1792x1024'
"number_of_images": 2 //Use only when generate_type is Text
}
await prompt_instance.execute(body)
0.0.20
1 year ago
0.0.10
1 year ago
0.0.11
1 year ago
0.0.12
1 year ago
0.0.13
1 year ago
0.0.14
1 year ago
0.0.15
1 year ago
0.0.9
1 year ago
0.0.16
1 year ago
0.0.8
1 year ago
0.0.17
1 year ago
0.0.18
1 year ago
0.0.19
1 year ago
0.0.7
1 year ago
0.0.6
1 year ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago