Dagger
Search

daggy

It is powered by OpenAI and GPTScript

Installation

dagger install github.com/shykes/daggerverse/daggy@v0.4.0

Entrypoint

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

Types

Daggy 🔗

Daggy is an AI agent that knows how to call Dagger functions. It is powered by OpenAI and GPTScript

do() 🔗

Tell Daggy to do something

Return Type
String !
Arguments
NameTypeDefault ValueDescription
promptString !-A prompt telling Daggy what to do
tokenSecret -OpenAI API key
baseContainer -Custom base container
Example
dagger -m github.com/shykes/daggerverse/daggy@de9d9670c76e7b89a06800cf938ce8303f94569c call \
 do --prompt string
func (m *myModule) example(ctx context.Context, prompt string) string  {
	return dag.
			Daggy().
			Do(ctx, prompt)
}
@function
async def example(prompt: str) -> str:
	return await (
		dag.daggy()
		.do(prompt)
	)
@func()
async example(prompt: string): Promise<string> {
	return dag
		.daggy()
		.do(prompt)
}

server() 🔗

Run the gptscript server NOTE: this does not work currently. Help wanted :)

Return Type
Service !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-OpenAI API key
baseContainer -Custom base container
Example
dagger -m github.com/shykes/daggerverse/daggy@de9d9670c76e7b89a06800cf938ce8303f94569c call \
 server --token env:MYSECRET
func (m *myModule) example(token *Secret) *Service  {
	return dag.
			Daggy().
			Server(token)
}
@function
def example(token: dagger.Secret) -> dagger.Service:
	return (
		dag.daggy()
		.server(token)
	)
@func()
example(token: Secret): Service {
	return dag
		.daggy()
		.server(token)
}

debug() 🔗

Return Type
Terminal !
Arguments
NameTypeDefault ValueDescription
tokenSecret -OpenAI API key
baseContainer -Custom base container
Example
Function Daggy.debug is not accessible from the daggy module
func (m *myModule) example() *Terminal  {
	return dag.
			Daggy().
			Debug()
}
@function
def example() -> dag.Terminal:
	return (
		dag.daggy()
		.debug()
	)
@func()
example(): Terminal {
	return dag
		.daggy()
		.debug()
}

container() 🔗

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
tokenSecret -OpenAI API token
baseContainer -Custom base container
Example
dagger -m github.com/shykes/daggerverse/daggy@de9d9670c76e7b89a06800cf938ce8303f94569c call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Daggy().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.daggy()
		.container()
	)
@func()
example(): Container {
	return dag
		.daggy()
		.container()
}