dspy-rs 0.7.3

A DSPy rewrite(not port) to Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Example;
use anyhow::Result;
use serde_json::Value;

pub trait MetaSignature: Send + Sync {
    fn demos(&self) -> Vec<Example>;
    fn set_demos(&mut self, demos: Vec<Example>) -> Result<()>;
    fn instruction(&self) -> String;
    fn input_fields(&self) -> Value;
    fn output_fields(&self) -> Value;

    fn update_instruction(&mut self, instruction: String) -> Result<()>;
    fn append(&mut self, name: &str, value: Value) -> Result<()>;
}