Skip to content

Commit

Permalink
doc: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcheng1982 committed Apr 15, 2024
1 parent ba34607 commit 01825df
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,31 @@ package io.github.alexcheng1982.llmagentbuilder.core.chatmemory

import org.springframework.ai.chat.messages.Message

/**
* Chat memory
*/
interface ChatMemory {
/**
* ID of the chat memory
*/
fun id(): String

/**
* Add a message to the memory
*
* @param message Spring AI message to add
*/
fun add(message: Message)

/**
* Return a list of messages in the memory
*
* @return A list of messages
*/
fun messages(): List<Message>

/**
* Clear the memory, remove all messages
*/
fun clear()
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ package io.github.alexcheng1982.llmagentbuilder.core.tool

import java.util.function.Function

/**
* Agent tool
*/
interface AgentTool<REQUEST, RESPONSE> : Function<REQUEST, RESPONSE> {
/**
* Name of the agent tool, will be passed to LLM
*/
fun name(): String

/**
* Description of the agent tool, will be passed to LLM
*/
fun description(): String
}

Expand Down

0 comments on commit 01825df

Please sign in to comment.