Dagger
Search

gptools

This module serves as toolbox with different GPT related functions that can be used to interact with GPT models. The functions are designed to be used either in a stand-alone manner or in combination with other functions for more elaborated pipelines.

Installation

dagger install github.com/marcosnils/daggerverse/gptools@v0.0.2

Entrypoint

Return Type
Gptools !
Example
func (m *myModule) example() *Gptools  {
	return dag.
			Gptools()
}
@function
def example() -> dag.Gptools:
	return (
		dag.gptools()
	)
@func()
example(): Gptools {
	return dag
		.gptools()
}

Types

Gptools 🔗

baseCtr() 🔗

Return Type
Container !
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 base-ctr
func (m *myModule) example() *Container  {
	return dag.
			Gptools().
			BaseCtr()
}
@function
def example() -> dagger.Container:
	return (
		dag.gptools()
		.base_ctr()
	)
@func()
example(): Container {
	return dag
		.gptools()
		.baseCtr()
}

ytctr() 🔗

Return Type
Container !
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 ytctr
func (m *myModule) example() *Container  {
	return dag.
			Gptools().
			Ytctr()
}
@function
def example() -> dagger.Container:
	return (
		dag.gptools()
		.ytctr()
	)
@func()
example(): Container {
	return dag
		.gptools()
		.ytctr()
}

yturl() 🔗

Return Type
String !
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 yturl
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Gptools().
			Yturl(ctx)
}
@function
async def example() -> str:
	return await (
		dag.gptools()
		.yturl()
	)
@func()
async example(): Promise<string> {
	return dag
		.gptools()
		.yturl()
}

rag() 🔗

Runs a RAG model on the provided source directory and question

Return Type
String !
Arguments
NameTypeDefault ValueDescription
openaiApiKeySecret !-No description provided
sourceDirectory !-No description provided
questionString !-No description provided
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 rag --openai-api-key env:MYSECRET --source DIR_PATH --question string
func (m *myModule) example(ctx context.Context, openaiApiKey *Secret, source *Directory, question string) string  {
	return dag.
			Gptools().
			Rag(ctx, openaiApiKey, source, question)
}
@function
async def example(openai_api_key: dagger.Secret, source: dagger.Directory, question: str) -> str:
	return await (
		dag.gptools()
		.rag(openai_api_key, source, question)
	)
@func()
async example(openaiApiKey: Secret, source: Directory, question: string): Promise<string> {
	return dag
		.gptools()
		.rag(openaiApiKey, source, question)
}

ytChat() 🔗

Asks a question to a youtube video

Return Type
String !
Arguments
NameTypeDefault ValueDescription
openaiApiKeySecret !-No description provided
urlString !-No description provided
questionString !-No description provided
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 yt-chat --openai-api-key env:MYSECRET --url string --question string
func (m *myModule) example(ctx context.Context, openaiApiKey *Secret, url string, question string) string  {
	return dag.
			Gptools().
			YtChat(ctx, openaiApiKey, url, question)
}
@function
async def example(openai_api_key: dagger.Secret, url: str, question: str) -> str:
	return await (
		dag.gptools()
		.yt_chat(openai_api_key, url, question)
	)
@func()
async example(openaiApiKey: Secret, url: string, question: string): Promise<string> {
	return dag
		.gptools()
		.ytChat(openaiApiKey, url, question)
}

transcript() 🔗

Returns the video transcript as a txt file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
srcFile !-No description provided
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 transcript --src file:path
func (m *myModule) example(src *File) *File  {
	return dag.
			Gptools().
			Transcript(src)
}
@function
def example(src: dagger.File) -> dagger.File:
	return (
		dag.gptools()
		.transcript(src)
	)
@func()
example(src: File): File {
	return dag
		.gptools()
		.transcript(src)
}

audio() 🔗

Returns the video audio as an mp3 encoded file

Return Type
File !
Arguments
NameTypeDefault ValueDescription
urlString !-No description provided
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
 audio --url string
func (m *myModule) example(url string) *File  {
	return dag.
			Gptools().
			Audio(url)
}
@function
def example(url: str) -> dagger.File:
	return (
		dag.gptools()
		.audio(url)
	)
@func()
example(url: string): File {
	return dag
		.gptools()
		.audio(url)
}