gpt
No long description provided.
Installation
dagger install github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233
Entrypoint
Return Type
Gpt !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | OpenAI API token |
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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 🔗
debugLog() 🔗
Return Type
[String ! ] !
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 call \
--token env:MYSECRET debug-log
func (m *myModule) example(ctx context.Context, token *Secret) []string {
return dag.
Gpt(token).
DebugLog(ctx)
}
@function
async def example(token: dagger.Secret) -> List[str]:
return await (
dag.gpt(token)
.debug_log()
)
@func()
async example(token: Secret): Promise<string[]> {
return dag
.gpt(token)
.debugLog()
}
shellHistory() 🔗
Return Type
[Command ! ] !
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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() 🔗
history []openai.ChatCompletionMessageParamUnion
Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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()
}
history() 🔗
Return Type
String !
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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
Name | Type | Default Value | Description |
---|---|---|---|
callId | String ! | - | No description provided |
content | String ! | - | No description provided |
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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
Name | Type | Default Value | Description |
---|---|---|---|
prompt | String ! | - | No description provided |
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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
Name | Type | Default Value | Description |
---|---|---|---|
prompt | String ! | - | A prompt telling Daggy what to do |
knowledge | Boolean | true | No description provided |
Example
dagger -m github.com/shykes/x/gpt@3eb5343e4ecb7f3370835a9c95583fd73c9a2233 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)
}
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