Interface ISessionRESTClient
- Namespace
- FoundationaLLM.Client.Core.Interfaces
- Assembly
- FoundationaLLM.Client.Core.dll
Provides methods to manage calls to the Core API's session endpoints.
public interface ISessionRESTClient
- Extension Methods
Methods
CreateSessionAsync(ConversationProperties)
Creates a new session with the specified name.
Task<string> CreateSessionAsync(ConversationProperties chatSessionProperties)
Parameters
chatSessionPropertiesConversationPropertiesThe session properties.
Returns
DeleteSessionAsync(string)
Deletes a chat session.
Task DeleteSessionAsync(string sessionId)
Parameters
sessionIdstring
Returns
GetAllChatSessionsAsync()
Retrieves all chat sessions.
Task<IEnumerable<Conversation>> GetAllChatSessionsAsync()
Returns
GetChatSessionMessagesAsync(string)
Returns the chat messages related to an existing session.
Task<IEnumerable<Message>> GetChatSessionMessagesAsync(string sessionId)
Parameters
sessionIdstring
Returns
GetCompletionPromptAsync(string, string)
Gets a completion prompt by session ID and completion prompt ID.
Task<CompletionPrompt> GetCompletionPromptAsync(string sessionId, string completionPromptId)
Parameters
Returns
RateMessageAsync(string, string, MessageRatingRequest)
Sets the rating for a message.
Task RateMessageAsync(string sessionId, string messageId, MessageRatingRequest rating)
Parameters
sessionIdstringThe chat session ID that contains the message to rate.
messageIdstringThe ID of the message to rate.
ratingMessageRatingRequestThe rating and optional comments to assign to the message.
Returns
RenameChatSession(string, ConversationProperties)
Renames a chat session.
Task<string> RenameChatSession(string sessionId, ConversationProperties chatSessionProperties)
Parameters
sessionIdstringThe chat session ID.
chatSessionPropertiesConversationPropertiesThe session properties.