Dagger
Search

smart-module

No long description provided.

Installation

dagger install github.com/samalba/dagger-modules/smart-module@866a88757e67de9be1a9413b0e5058b8ad49001b

Entrypoint

Return Type
SmartModule !
Example
dagger -m github.com/samalba/dagger-modules/smart-module@866a88757e67de9be1a9413b0e5058b8ad49001b call \
func (m *myModule) example() *SmartModule  {
	return dag.
			SmartModule()
}
@function
def example() -> dag.SmartModule:
	return (
		dag.smart_module()
	)
@func()
example(): SmartModule {
	return dag
		.smartModule()
}

Types

SmartModule 🔗

ask() 🔗

Ask the LLM a prompt that involves a dagger module call

Return Type
String !
Arguments
NameTypeDefault ValueDescription
apiKeySecret !-A reference to a secret value, which can be handled more safely than the value itself.
promptString !-No description provided
Example
dagger -m github.com/samalba/dagger-modules/smart-module@866a88757e67de9be1a9413b0e5058b8ad49001b call \
 ask --api-key env:MYSECRET --prompt string
func (m *myModule) example(ctx context.Context, apiKey *Secret, prompt string) string  {
	return dag.
			SmartModule().
			Ask(ctx, apiKey, prompt)
}
@function
async def example(api_key: dagger.Secret, prompt: str) -> str:
	return await (
		dag.smart_module()
		.ask(api_key, prompt)
	)
@func()
async example(apiKey: Secret, prompt: string): Promise<string> {
	return dag
		.smartModule()
		.ask(apiKey, prompt)
}