Dagger
Search

gpt

No long description provided.

Installation

dagger install github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a

Entrypoint

Return Type
Gpt !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-OpenAI API token
modelString "gpt-4o"OpenAI model
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET
func (m *myModule) example(token *Secret) *Gpt  {
	return dag.
			Gpt(token)
}
@function
def example(token: dagger.Secret, ) -> dag.Gpt:
	return (
		dag.gpt(token)
	)
@func()
example(token: Secret, ): Gpt {
	return dag
		.gpt(token)
}

Types

Gpt 🔗

model() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET model
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Gpt(token).
			Model(ctx)
}
@function
async def example(token: dagger.Secret, ) -> str:
	return await (
		dag.gpt(token)
		.model()
	)
@func()
async example(token: Secret, ): Promise<string> {
	return dag
		.gpt(token)
		.model()
}

log() 🔗

Return Type
[String ! ] !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET log
func (m *myModule) example(ctx context.Context, token *Secret) []string  {
	return dag.
			Gpt(token).
			Log(ctx)
}
@function
async def example(token: dagger.Secret, ) -> List[str]:
	return await (
		dag.gpt(token)
		.log()
	)
@func()
async example(token: Secret, ): Promise<string[]> {
	return dag
		.gpt(token)
		.log()
}

shellHistory() 🔗

Return Type
[Command ! ] !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET shell-history
func (m *myModule) example(token *Secret) []*GptCommand  {
	return dag.
			Gpt(token).
			ShellHistory()
}
@function
def example(token: dagger.Secret, ) -> List[dag.GptCommand]:
	return (
		dag.gpt(token)
		.shell_history()
	)
@func()
example(token: Secret, ): GptCommand[] {
	return dag
		.gpt(token)
		.shellHistory()
}

lastReply() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET last-reply
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Gpt(token).
			LastReply(ctx)
}
@function
async def example(token: dagger.Secret, ) -> str:
	return await (
		dag.gpt(token)
		.last_reply()
	)
@func()
async example(token: Secret, ): Promise<string> {
	return dag
		.gpt(token)
		.lastReply()
}

knowledgeBase() 🔗

Return Type
[Knowledge ! ] !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET knowledge-base
func (m *myModule) example(token *Secret) []*GptKnowledge  {
	return dag.
			Gpt(token).
			KnowledgeBase()
}
@function
def example(token: dagger.Secret, ) -> List[dag.GptKnowledge]:
	return (
		dag.gpt(token)
		.knowledge_base()
	)
@func()
example(token: Secret, ): GptKnowledge[] {
	return dag
		.gpt(token)
		.knowledgeBase()
}

withKnowledge() 🔗

Return Type
Gpt !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
descriptionString !-No description provided
contentsString !-No description provided
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET with-knowledge --name string --description string --contents string
func (m *myModule) example(token *Secret, name string, description string, contents string) *Gpt  {
	return dag.
			Gpt(token).
			WithKnowledge(name, description, contents)
}
@function
def example(token: dagger.Secret, name: str, description: str, contents: str) -> dag.Gpt:
	return (
		dag.gpt(token)
		.with_knowledge(name, description, contents)
	)
@func()
example(token: Secret, name: string, description: string, contents: string): Gpt {
	return dag
		.gpt(token)
		.withKnowledge(name, description, contents)
}

knowledge() 🔗

Return Type
Knowledge !
Arguments
NameTypeDefault ValueDescription
nameString !-No description provided
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET knowledge --name string
func (m *myModule) example(token *Secret, name string) *GptKnowledge  {
	return dag.
			Gpt(token).
			Knowledge(name)
}
@function
def example(token: dagger.Secret, name: str) -> dag.GptKnowledge:
	return (
		dag.gpt(token)
		.knowledge(name)
	)
@func()
example(token: Secret, name: string): GptKnowledge {
	return dag
		.gpt(token)
		.knowledge(name)
}

history() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET history
func (m *myModule) example(ctx context.Context, token *Secret) string  {
	return dag.
			Gpt(token).
			History(ctx)
}
@function
async def example(token: dagger.Secret, ) -> str:
	return await (
		dag.gpt(token)
		.history()
	)
@func()
async example(token: Secret, ): Promise<string> {
	return dag
		.gpt(token)
		.history()
}

withToolOutput() 🔗

Return Type
Gpt !
Arguments
NameTypeDefault ValueDescription
callIdString !-No description provided
contentString !-No description provided
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET with-tool-output --call-id string --content string
func (m *myModule) example(token *Secret, callId string, content string) *Gpt  {
	return dag.
			Gpt(token).
			WithToolOutput(callId, content)
}
@function
def example(token: dagger.Secret, call_id: str, content: str) -> dag.Gpt:
	return (
		dag.gpt(token)
		.with_tool_output(call_id, content)
	)
@func()
example(token: Secret, callId: string, content: string): Gpt {
	return dag
		.gpt(token)
		.withToolOutput(callId, content)
}

withPrompt() 🔗

Return Type
Gpt !
Arguments
NameTypeDefault ValueDescription
promptString !-No description provided
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET with-prompt --prompt string
func (m *myModule) example(token *Secret, prompt string) *Gpt  {
	return dag.
			Gpt(token).
			WithPrompt(prompt)
}
@function
def example(token: dagger.Secret, prompt: str) -> dag.Gpt:
	return (
		dag.gpt(token)
		.with_prompt(prompt)
	)
@func()
example(token: Secret, prompt: string): Gpt {
	return dag
		.gpt(token)
		.withPrompt(prompt)
}

ask() 🔗

Return Type
Gpt !
Arguments
NameTypeDefault ValueDescription
promptString !-The message to send the model
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 --token env:MYSECRET ask --prompt string
func (m *myModule) example(token *Secret, prompt string) *Gpt  {
	return dag.
			Gpt(token).
			Ask(prompt)
}
@function
def example(token: dagger.Secret, prompt: str) -> dag.Gpt:
	return (
		dag.gpt(token)
		.ask(prompt)
	)
@func()
example(token: Secret, prompt: string): Gpt {
	return dag
		.gpt(token)
		.ask(prompt)
}

Knowledge 🔗

name() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 knowledge --name string \
 name
func (m *myModule) example(ctx context.Context, name string) string  {
	return dag.
			Gpt().
			Knowledge(name).
			Name(ctx)
}
@function
async def example(name: str) -> str:
	return await (
		dag.gpt()
		.knowledge(name)
		.name()
	)
@func()
async example(name: string): Promise<string> {
	return dag
		.gpt()
		.knowledge(name)
		.name()
}

description() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 knowledge --name string \
 description
func (m *myModule) example(ctx context.Context, name string) string  {
	return dag.
			Gpt().
			Knowledge(name).
			Description(ctx)
}
@function
async def example(name: str) -> str:
	return await (
		dag.gpt()
		.knowledge(name)
		.description()
	)
@func()
async example(name: string): Promise<string> {
	return dag
		.gpt()
		.knowledge(name)
		.description()
}

contents() 🔗

Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@4b22b446610a5477ba6fb2e1de15e360168de66a call \
 knowledge --name string \
 contents
func (m *myModule) example(ctx context.Context, name string) string  {
	return dag.
			Gpt().
			Knowledge(name).
			Contents(ctx)
}
@function
async def example(name: str) -> str:
	return await (
		dag.gpt()
		.knowledge(name)
		.contents()
	)
@func()
async example(name: string): Promise<string> {
	return dag
		.gpt()
		.knowledge(name)
		.contents()
}

Command 🔗

command() 🔗

Return Type
String !
Example
Function GptCommand.command is not accessible from the gpt module
Function GptCommand.command is not accessible from the gpt module
Function GptCommand.command is not accessible from the gpt module
Function GptCommand.command is not accessible from the gpt module

success() 🔗

Return Type
Boolean !
Example
Function GptCommand.success is not accessible from the gpt module
Function GptCommand.success is not accessible from the gpt module
Function GptCommand.success is not accessible from the gpt module
Function GptCommand.success is not accessible from the gpt module

result() 🔗

Return Type
String !
Example
Function GptCommand.result is not accessible from the gpt module
Function GptCommand.result is not accessible from the gpt module
Function GptCommand.result is not accessible from the gpt module
Function GptCommand.result is not accessible from the gpt module

error() 🔗

Return Type
String !
Example
Function GptCommand.error is not accessible from the gpt module
Function GptCommand.error is not accessible from the gpt module
Function GptCommand.error is not accessible from the gpt module
Function GptCommand.error is not accessible from the gpt module