Skip to content

Conversation

@AlexMikhalev
Copy link

…ig-core

This example demonstrates how to use the rig-core library (https://github.com/0xPlaygrounds/rig) with Ollama to generate structured recipe data. It's a translation of the langchain-simple Python example using Rust and the rig framework.

Key features:

  • Uses rig-core 0.23 with Ollama provider
  • Leverages rig's extractor pattern for structured output with JSON Schema
  • Integrates with Coagent server for logging LLM calls
  • Type-safe structured data using serde and schemars
  • Async/await with Tokio runtime

The implementation includes:

  • Cargo.toml with dependencies (rig-core, serde, schemars, tokio, etc.)
  • Structured recipe models with JsonSchema derives
  • Recipe generator using rig's extractor
  • Coagent client for logging
  • Configuration management
  • Comprehensive README with examples and troubleshooting

Related to rust-genai-simple example but using the rig framework instead.

…ig-core

This example demonstrates how to use the rig-core library (https://github.com/0xPlaygrounds/rig)
with Ollama to generate structured recipe data. It's a translation of the langchain-simple
Python example using Rust and the rig framework.

Key features:
- Uses rig-core 0.23 with Ollama provider
- Leverages rig's extractor pattern for structured output with JSON Schema
- Integrates with Coagent server for logging LLM calls
- Type-safe structured data using serde and schemars
- Async/await with Tokio runtime

The implementation includes:
- Cargo.toml with dependencies (rig-core, serde, schemars, tokio, etc.)
- Structured recipe models with JsonSchema derives
- Recipe generator using rig's extractor
- Coagent client for logging
- Configuration management
- Comprehensive README with examples and troubleshooting

Related to rust-genai-simple example but using the rig framework instead.
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.

3 participants