llm-test-module
This module is necessary for testing allow-llm policy enforcement around git-sourced modules and is called by its parent LLMDirModuleDependerInstallation
dagger install github.com/dagger/dagger-test-modules/llm-dir-module-depender/llm-test-module@b9109a8aaa19837eaed0671a84b7a39ac6018381
Entrypoint
Return Type
LlmTestModule !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
model | String | - | No description provided |
Example
dagger -m github.com/dagger/dagger-test-modules/llm-dir-module-depender/llm-test-module@b9109a8aaa19837eaed0671a84b7a39ac6018381 call \
func (m *myModule) example() *LlmTestModule {
return dag.
LlmTestModule()
}
@function
def example() -> dag.LlmTestModule:
return (
dag.llm_test_module()
)
@func()
example(): LlmTestModule {
return dag
.llmTestModule()
}
Types
LlmTestModule 🔗
prompt() 🔗
access the LLM api in the most minimal way: prompt it, then retrieve history
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
stringArg | String ! | - | No description provided |
Example
dagger -m github.com/dagger/dagger-test-modules/llm-dir-module-depender/llm-test-module@b9109a8aaa19837eaed0671a84b7a39ac6018381 call \
prompt --string-arg string
func (m *myModule) example(ctx context.Context, stringArg string) string {
return dag.
LlmTestModule().
Prompt(ctx, stringArg)
}
@function
async def example(string_arg: str) -> str:
return await (
dag.llm_test_module()
.prompt(string_arg)
)
@func()
async example(stringArg: string): Promise<string> {
return dag
.llmTestModule()
.prompt(stringArg)
}
save() 🔗
this is a hack until we can return the LLM type and replay history
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
stringArg | String ! | - | No description provided |
Example
dagger -m github.com/dagger/dagger-test-modules/llm-dir-module-depender/llm-test-module@b9109a8aaa19837eaed0671a84b7a39ac6018381 call \
save --string-arg string
func (m *myModule) example(ctx context.Context, stringArg string) string {
return dag.
LlmTestModule().
Save(ctx, stringArg)
}
@function
async def example(string_arg: str) -> str:
return await (
dag.llm_test_module()
.save(string_arg)
)
@func()
async example(stringArg: string): Promise<string> {
return dag
.llmTestModule()
.save(stringArg)
}