package schema

import "github.com/bububa/mdencoder"

// Input implements BaseAgentInputSchema
// This schema represents the input from the user to the AI agent.
type Input struct {
	Base
	// ChatMessage is the chat message sent by the user to the assistant.
	ChatMessage string `json:"chat_message" yaml:"ChatMessage" jsonschema:"title=chat_message,description=The chat message sent by the user to the assistant."`
}

// NewInput returns a new BaseAgentInput
func NewInput(chatMessage string) *Input {
	ret := new(Input)
	ret.ChatMessage = chatMessage
	return ret
}

func (i Input) String() string {
	bs, _ := mdencoder.Marshal(i)
	return string(bs)
}

// CreateeInput returns a BaseAgentInput
func CreateInput(chatMessage string) Input {
	return Input{
		ChatMessage: chatMessage,
	}
}

// Output implements BaseAgentOutputSchema
// This schema represents the response generated by the chat agent.
type Output struct {
	Base
	// ChatMessage is the chat message exchanged between the user and the chat agent.
	// contains the markdown-enabled response generated by the chat agent.
	ChatMessage string `json:"chat_message" yaml:"ChatMessage" jsonschema:"title=chat_message,description=The chat message exchanged between the user and the chat agent.This contains the markdown-enabled response generated by the chat agent."`
}

// NewOutput returns a new BaseAgentOutput
func NewOutput(chatMessage string) *Output {
	ret := new(Output)
	ret.ChatMessage = chatMessage
	return ret
}

// CreateOutput returns a BaseAgentOutput
func CreateOutput(chatMessage string) Output {
	return Output{
		ChatMessage: chatMessage,
	}
}
