AIME JavaScript API Client Interface
A Javascript interface to connect your client with an AIME API server
Setup
The Javascript client interface is contained in a single js file: model_api.js
For cross-site scripting security reasons and to fulfil the same-origin policy of web browsers, it is easiest to host a copy of the file on the web server the HTML files are served from.
Examples
Simple single call example:
<script src="/js/model_api.js"></script>
<script>
function onResultCallback(data) {
console.log(data.text) // print generated text to console
}
params = new Object({
text : 'Your text prompt'
});
doAPIRequest('llama2_chat', params, onResultCallback, 'user_name', 'user_key');
</script>
Note
This project is under active development.