✨Feat: 前端项目初始化
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
package handle
|
||||
|
||||
import (
|
||||
"agent/agent"
|
||||
"context"
|
||||
|
||||
"github.com/tmc/langchaingo/llms"
|
||||
)
|
||||
|
||||
var files = []string{
|
||||
".\\prompt\\card.txt",
|
||||
".\\prompt\\guodegang.txt",
|
||||
".\\prompt\\mermaid.txt",
|
||||
".\\prompt\\quiz.txt",
|
||||
".\\prompt\\scenario.txt",
|
||||
}
|
||||
|
||||
func GetCard(llm llms.Model, ctx context.Context, topic string) (response string) {
|
||||
file := files[0]
|
||||
response = agent.CallWithAgent(llm, ctx, topic, file)
|
||||
return
|
||||
}
|
||||
|
||||
func GetGuodegang(llm llms.Model, ctx context.Context, topic string) (response string) {
|
||||
file := files[1]
|
||||
response = agent.CallWithAgent(llm, ctx, topic, file)
|
||||
return
|
||||
}
|
||||
|
||||
func GetMermaid(llm llms.Model, ctx context.Context, topic string) (response string) {
|
||||
file := files[2]
|
||||
response = agent.CallWithAgent(llm, ctx, topic, file)
|
||||
return
|
||||
}
|
||||
|
||||
func GetQuiz(llm llms.Model, ctx context.Context, topic string) (response string) {
|
||||
file := files[3]
|
||||
response = agent.CallWithAgent(llm, ctx, topic, file)
|
||||
return
|
||||
}
|
||||
|
||||
func GetScenario(llm llms.Model, ctx context.Context, topic string) (response string) {
|
||||
file := files[4]
|
||||
response = agent.CallWithAgent(llm, ctx, topic, file)
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user