Podにキーを渡す実装

This commit is contained in:
2026-04-11 19:28:59 +09:00
parent 9b78c51d0a
commit 7249a8ee6a
10 changed files with 256 additions and 73 deletions
+1 -2
View File
@@ -21,7 +21,6 @@ name = "hello-pod"
[provider]
kind = "anthropic"
model = "claude-sonnet-4-20250514"
api_key_env = "ANTHROPIC_API_KEY"
[worker]
system_prompt = "You are a concise assistant. Reply in one or two sentences."
@@ -41,7 +40,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let store = FsStore::new(tmp.path()).await?;
// 3. Build the Pod from manifest
let mut pod = Pod::from_manifest(manifest, store, None).await?;
let mut pod = Pod::from_manifest(manifest, store, None, None).await?;
println!("Session: {}", pod.session_id());
// 4. Run a prompt
+1 -2
View File
@@ -15,7 +15,6 @@ name = "protocol-demo"
[provider]
kind = "anthropic"
model = "claude-sonnet-4-20250514"
api_key_env = "ANTHROPIC_API_KEY"
[worker]
system_prompt = "You are a concise assistant. Reply in one or two sentences."
@@ -29,7 +28,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let manifest = PodManifest::from_toml(MANIFEST_TOML)?;
let tmp = tempfile::tempdir()?;
let store = FsStore::new(tmp.path()).await?;
let pod = pod::Pod::from_manifest(manifest, store, None).await?;
let pod = pod::Pod::from_manifest(manifest, store, None, None).await?;
let runtime_tmp = tempfile::tempdir()?;
let handle = PodController::spawn(pod, runtime_tmp.path()).await?;