File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
java/com/embabel/template/injected Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11package com .embabel .template .injected ;
22
33import com .embabel .agent .api .common .Ai ;
4+ import jakarta .validation .constraints .Pattern ;
45import org .springframework .stereotype .Component ;
56
67/**
1112@ Component
1213public record InjectedDemo (Ai ai ) {
1314
14- public record Animal (String name , String species ) {
15+ /**
16+ * Demonstrates use of JSR-380 validation annotations on record fields
17+ * to constrain generated content.
18+ */
19+ public record Animal (
20+ String name ,
21+ @ Pattern (regexp = ".*ox.*" , message = "Species must contain 'ox'" )
22+ String species ) {
1523 }
1624
1725 public Animal inventAnimal () {
Original file line number Diff line number Diff line change 33# embabel.models.default-llm=llama3.1:8b
44# embabel.models.default-embedding-model=nomic-embed-text:latest
55
6+ embabel.agent.platform.llm-operations.data-binding.send_validation_info =true
7+
68# Llm Roles: Create as many as you want and use with byRole("role-name")
79# embabel.models.llms.best=llama3.1:8b
810# embabel.models.llms.cheapest=llama3.1:8b
You can’t perform that action at this time.
0 commit comments