Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaakaa/slidaiv
slidaiv is VS Code Extension to generate Slidev contents by LLM
https://github.com/kaakaa/slidaiv
llm slidev vscode-extension
Last synced: 23 days ago
JSON representation
slidaiv is VS Code Extension to generate Slidev contents by LLM
- Host: GitHub
- URL: https://github.com/kaakaa/slidaiv
- Owner: kaakaa
- License: mit
- Created: 2024-06-22T12:51:19.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-10-22T18:23:47.000Z (3 months ago)
- Last Synced: 2024-12-08T17:42:18.168Z (29 days ago)
- Topics: llm, slidev, vscode-extension
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=kaakaa.slidaiv
- Size: 1.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Released version](https://img.shields.io/visual-studio-marketplace/v/kaakaa.slidaiv?color=0078d7)](https://marketplace.visualstudio.com/items?itemName=kaakaa.slidaiv) [![NPM](https://img.shields.io/npm/v/slidaiv?color=cc3534)](https://www.npmjs.com/package/slidaiv) [![ci](https://github.com/kaakaa/slidaiv/actions/workflows/ci.yml/badge.svg)](https://github.com/kaakaa/slidaiv/actions/workflows/ci.yml)
# Slidaiv
Slidaiv leverages AI/LLM to automatically generate content for [Slidev](https://sli.dev/) presentations, making it easier for users to write a Slidev presentation.
[![Demo](https://raw.githubusercontent.com/kaakaa/slidaiv/master/resources/slidaiv-demo.gif)](https://github.com/kaakaa/slidaiv/blob/master/resources/slidaiv-demo.gif))
## Features
- **Automatic Content Generation**: Generate Slidev content using AI/LLM based on user prompts.
- **Easy Integration**: Seamlessly integrates with VS Code for a smooth workflow.
- **Customizable**: Users can use OpenAI or OpenAI-compatible API, choose favorite models, and specify their own prompts to generate contents.
- **Generate all slides**: With [slidaiv-cli](https://www.npmjs.com/package/slidaiv), enable to generate multiple page slide in one command.# Getting started
## VS Code Extension
1. Install [Slidaiv Extension](https://marketplace.visualstudio.com/items?itemName=kaakaa.slidaiv) from VS Code or Marketplace
2. Set your **API Key** to call OpenAI (or OpenAI-comptible) service
* If the popup to enter **API Key** didn't open, type `Sliadiv: Set API Key` in the command palette
[![Demo](https://raw.githubusercontent.com/kaakaa/slidaiv/master/resources/slidaiv-vscode-set-api-key.png)](https://github.com/kaakaa/slidaiv/blob/master/resources/slidaiv-vscode-set-api-key.png)
3. Configure Slidaiv settings from preferences (see [Extension settings](#extension-settings))
4. Write prompt in frontmatter and run **(Right click) > Slidaiv > Generate Slide contents** on .md file```md
...
---
# Write prompt to LLM in frontmatter and generate Slidev contents
# by "Context Menu > Generate Slidev contents".
slidaiv:
prompt:
- Generate awesome page to introduce Slidev
- features, how to start it
# Can specify the language for generated content. If unspecified,
# VS Code's language setting will be used.
locale: en
---## Slide Title: Why You Should Use Slidev
Slidev is a versatile slideshow platform that offers:
- Simple Markdown syntax, easy to learn and use!
- Highly customizable themes, UNOCSS support for styling
- Interactive features for audience engagement
- Export to HTML, PDF, or reveal.jsGet started:
` ``bash
npm i -g slidev
slidev init # select a template
cd .slidev && slidev serve
` ``---
# Wrap up
...
```### Extension settings
| Name | Description | Default |
|:-|:-|:-|
| API Key | API Key to send request to OpenAI(-compatible) service. | (Set via popup) |
| Base URL | API endpoint to send request | `https://api.openai.com/v1` |
| Model | LLM model name | `gpt-3.5-turbo` |
| Prompt: Generate | System prompt to be used when generating Slidev contents | See [prompts.ts](https://github.com/kaakaa/slidaiv/blob/master/src/client/prompts.ts) |
| Prompt: Decorate | System prompt to be used when decorating contents | See [prompts.ts](https://github.com/kaakaa/slidaiv/blob/master/src/client/prompts.ts) |
| Debug | Turn on outputing debug log | `false` |## CLI
1. Install `slidaiv` by `npm install slidaiv`
2. Write `slides.yaml` to generate slides
3. Run `npx slidaiv````bash
$ npx slidaiv -h
Usage: slidaiv [options]Options:
-i, --input input yaml file path to generate slide (default: "slides.yaml")
-o, --output output path to write markdown file
-l, --locale locale of generated slide
-s, --service service to use ("openai" or "azure-ai-inference") (default: "openai")
-u, --apiurl base url of openai api (e.g.: https://api.openai.com/v1)
-k, --apikey api key of openai (or openai-compatible) api
-m, --model model of openai api
-d, --debug output extra debugging (default: false)
-h, --help display help for command$ cat slides.yaml
context:
baseUrl: http://api.openai.com/v1
apiKey: xxxxxxxxx
model: gpg-4o
locale: ja
slides:
- prompts:
- What is the capital of France?
- prompts:
- What is the capital of Germany?
- prompts:
- What is the capital of United States?
- prompts:
- What is the capital of Japan?
- Where is it?
```## License
See [LICENSE.txt](./LICENSE.txt)