0.1.12 • Published 6 months ago

llamotion-sdk v0.1.12

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

LLAMotion SDK

This is the SDK for LLAMotion, a tool that allows you to generate VueMotion animations from natural language.

Installation

npm install llamotion-sdk

And use the plugin in your Vue app:

import { createApp } from 'vue'
import { llamotion } from 'llamotion-sdk'

createApp(App).use(llamotion()).mount('#app')

Usage

Notice: LLAMotion is still in the alpha stage, the API still not be public. This document is for the internal user.

Firstly, you need to create a client:

const client = createLLAMotionClient({
  apiKey: 'YOUR_OPENAI_API_KEY',
  model: 'The current fine-tuned model'
})

And then you can use the client to request the animation:

const animation = await client.requestAsComponent('Please create a simple animation that moves a rectangle and a arc with VueMotion zoom out to 2x, please use animation api scale')

The animation is a dynamic component, you can use it directly in your template:

<template>
  <component :is="animation" />
</template>

The last step is set the style:

<style scoped>
template {
  display: block;
}
</style>

If you want to just compile the Vue component, you can use compileVueString function:

const component = compileVueString(code)

The main reason is that you may want to use other language to generate the Vue component.

0.1.12

6 months ago

0.1.11

6 months ago

0.1.10

6 months ago

0.1.9

6 months ago

0.1.8

6 months ago

0.1.7

6 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago