dspy_rs/core/
signature.rs

1use crate::Example;
2use anyhow::Result;
3use serde_json::Value;
4
5pub trait MetaSignature: Send + Sync {
6    fn demos(&self) -> Vec<Example>;
7    fn set_demos(&mut self, demos: Vec<Example>) -> Result<()>;
8    fn instruction(&self) -> String;
9    fn input_fields(&self) -> Value;
10    fn output_fields(&self) -> Value;
11
12    fn update_instruction(&mut self, instruction: String) -> Result<()>;
13    fn append(&mut self, name: &str, value: Value) -> Result<()>;
14}