-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Initialize Spring AI Alibaba project with DotPrompt support #304
base: workflow
Are you sure you want to change the base?
Conversation
Core features: - Implement DotPrompt template system with Handlebars support - Add ClassPath-based prompt loader and renderer - Implement LRU caching for template compilation - Add Spring Boot auto-configuration Examples: - Add text processing example with analyze/summarize/translate capabilities - Include API controller for DotPrompt operations - Add comprehensive test cases The project provides a Spring Boot starter for AI prompt template management, with built-in caching and flexible template loading mechanisms.
import lombok.Data; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
或者可以不使用 lombok ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
工程里面很多地方都用了,要不用就都不用比较好
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,应该统一一下
@ConfigurationProperties(prefix = DotPromptProperties.PREFIX) | ||
public class DotPromptProperties { | ||
|
||
public static final String PREFIX = "spring.ai.alibaba.dotprompt"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spring.ai.dotprompt
会更好一些?这里要出现组织名字吗?cc @chickenlj
if (prompt.getInput() != null && prompt.getInput().getDefaultValues() != null) { | ||
context.putAll(prompt.getInput().getDefaultValues()); | ||
} | ||
if (variables != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
多加一下判空?或者用 map.isEmpty()?
Core features:
Examples:
The project provides a Spring Boot starter for AI prompt template management, with built-in caching and flexible template loading mechanisms.
Describe what this PR does / why we need it
Does this pull request fix one issue?
Describe how you did it
Describe how to verify it
Special notes for reviews