simple_agent (agents v0.2.0)

View Source

Summary

Functions

Send a chat message with default settings

Send a chat message with optional settings

Send a streaming chat message with default settings

Send a streaming chat message with optional settings

Start the application

Start a simple agent as a gen_server

Stop the application

Functions

chat(Message)

-spec chat(binary()) -> binary() | {error, term()}.

Send a chat message with default settings

chat(Message, Options)

-spec chat(binary(), map()) -> binary() | {error, term()}.

Send a chat message with optional settings

chat_stream(Message)

-spec chat_stream(binary()) -> ok.

Send a streaming chat message with default settings

chat_stream(Message, Options)

-spec chat_stream(binary(), map()) -> ok.

Send a streaming chat message with optional settings

start()

-spec start() -> ok | {error, term()}.

Start the application

start_link(AgentId)

-spec start_link(string()) -> {ok, pid()} | {error, term()}.

Start a simple agent as a gen_server

stop()

-spec stop() -> ok | {error, term()}.

Stop the application