Skip to content
/ vx Public

🎧 Explain videos in plain text with LLMs

License

Notifications You must be signed in to change notification settings

hum/vx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vx

Explain videos in plain text with LLMs.

Install CLI

> go install github.com/hum/vx/cmd/vx@latest
> vx --help

Install package

> go get github.com/hum/vx

Usage

As a CLI

The CLI allows specifying an alternative API to use (only tested with Perplexity), as well as a custom prompt or a model. For all options use:

> vx --help

Vx supports both streamed and non-streamed responses on the CLI. Use the --stream flag to stream to STDOUT.

> vx --url "url" --stream

As a package

package main

import (
	"context"
	"fmt"
	"time"

	"github.com/hum/vx"
	"github.com/sashabaranov/go-openai"
)

func main() {
	oapi := openai.NewClient("token")

	r, err := vx.GetVideoExplanationRequests(oapi, vx.VideoExplanationOpts{
		Url:       "url",
		Prompt:    "Give me 5 bullet points from this text: ",
		ChunkSize: 5 * time.Minute,
	})
	if err != nil {
		panic(err)
	}

	for _, request := range r {
		response, err := oapi.CreateChatCompletion(context.TODO(), request)
		if err != nil {
			panic(err)
		}
		fmt.Println(response.Choices[0].Message.Content)
	}
}

About

🎧 Explain videos in plain text with LLMs

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages