0.1.12 • Published 10 months ago

llamotion-sdk v0.1.12

Weekly downloads
-
License
ISC
Repository
-
Last release
10 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

10 months ago

0.1.11

10 months ago

0.1.10

10 months ago

0.1.9

10 months ago

0.1.8

10 months ago

0.1.7

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.4

10 months ago

0.1.3

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago