With Palico you can build complex LLM applications with complete flexibility.
src/agents
and adding an index.ts
file.
index.ts
file should export a function of type Chat
. You have complete control over the implementation detail of your chat function.
Chat
function’s interface.
stream.push()
method in the ChatRequest
object.
conversationId
and a requestId
as part of a request input. Each request has a unique requestId
and all requests in a conversation share the same conversationId
.
Agent.chat()
method. For example, let’s say you have another agent called my_other_agent
:
my_other_agent
from my_agent
like this:
Chat
is a function you have to implement for defining your application logic. It takes in ChatRequest as an input and returns ChatResponse as output. For stream-based applications, no return is expected. The input and output of the function are defined as follows: