UNPKG

dspy.ts

Version:

DSPy.ts - Declarative Self-Learning TypeScript: A framework for compositional LM pipelines with self-improving prompt strategies.

29 lines (20 loc) 988 B
This phase creates comprehensive documentation and example implementations for DSPy.ts. We'll provide detailed API references, usage guides, and practical examples that demonstrate the framework's capabilities. ```markdown # DSPy.ts (Declarative Self-Learning TypeScript) DSPy.ts is a modular framework for building language model pipelines in JavaScript/TypeScript. It provides a declarative approach to composing LM calls and supports multiple backends including ONNX Runtime Web and JS-PyTorch. // Configure DSPy.ts to use an ONNX model const model = new ONNXModel({ const result = await sentimentModule.run({ text: 'I love using DSPy.ts!' }); ```markdown # DSPy.ts API Reference The foundation for all DSPy.ts modules: ```markdown # DSPy.ts Module Types DSPy.ts supports different types of modules for various LM interaction patterns: ```markdown # DSPy.ts Pipeline Guide git add examples/ ## Overview git commit -m "Add example implementations demonstrating DSPy.ts usage"