gptools
This module serves as toolbox with different GPT related functions that canbe 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.2Entrypoint
Return Type
Gptools ! Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
func (m *MyModule) Example() *dagger.Gptools {
return dag.
Gptools()
}@function
def example() -> dagger.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-ctrfunc (m *MyModule) Example() *dagger.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 \
ytctrfunc (m *MyModule) Example() *dagger.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 \
yturlfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| openaiApiKey | Secret ! | - | No description provided |
| source | Directory ! | - | No description provided |
| question | String ! | - | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
rag --openai-api-key env:MYSECRET --source DIR_PATH --question stringfunc (m *MyModule) Example(ctx context.Context, openaiApiKey *dagger.Secret, source *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| openaiApiKey | Secret ! | - | No description provided |
| url | String ! | - | No description provided |
| question | String ! | - | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
yt-chat --openai-api-key env:MYSECRET --url string --question stringfunc (m *MyModule) Example(ctx context.Context, openaiApiKey *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | File ! | - | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
transcript --src file:pathfunc (m *MyModule) Example(src *dagger.File) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String ! | - | No description provided |
Example
dagger -m github.com/marcosnils/daggerverse/gptools@c3f85409f535112047ef609885e152648826b4ce call \
audio --url stringfunc (m *MyModule) Example(url string) *dagger.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)
}