Skip to content

add module that uses LLM api#8

Merged
cwlbraa merged 6 commits into
dagger:mainfrom
cwlbraa:main
Mar 21, 2025
Merged

add module that uses LLM api#8
cwlbraa merged 6 commits into
dagger:mainfrom
cwlbraa:main

Conversation

@cwlbraa
Copy link
Copy Markdown
Contributor

@cwlbraa cwlbraa commented Mar 18, 2025

this will help us test LLM-allow policies.

there are 2 modules here, the outer one depends on the inner one via relative-path import. this is to test that we don't have a hole in our policy if GitModuleSources import DirModuleSources. Spoiler, there's no hole afaict, the inner one gets treated as a GitModuleSource too.

Signed-off-by: Connor Braa <connor@dagger.io>
@cwlbraa cwlbraa requested review from jedevc and vito March 18, 2025 17:51
cwlbraa added 3 commits March 18, 2025 11:13
this way we can git-call it from dagger/dagger and expect failures, but we also get the nested git-calls-dir thing in llm-dir-module-depender

Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
cwlbraa added 2 commits March 20, 2025 15:08
Signed-off-by: Connor Braa <connor@dagger.io>
Signed-off-by: Connor Braa <connor@dagger.io>
}

func (m LlmTestModule) llm(stringArg string) *dagger.LLM {
return dag.Llm(dagger.LlmOpts{Model: m.Model}).WithPrompt(stringArg).SetString("CACHE_BUSTER", uuid.NewString())
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was kinda a shot in the dark, but i like to re-use the same prompt under test and I think this gives the cache-busting behavior necessary to do that without n=2+ calls always succeeding due to cache hits.

@cwlbraa cwlbraa merged commit e7c7d6a into dagger:main Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants