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
chatSessionProperties
ConversationPropertiesThe session properties.
Returns
DeleteSessionAsync(string)
Deletes a chat session.
Task DeleteSessionAsync(string sessionId)
Parameters
sessionId
string
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
sessionId
string
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
sessionId
stringThe chat session ID that contains the message to rate.
messageId
stringThe ID of the message to rate.
rating
MessageRatingRequestThe 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
sessionId
stringThe chat session ID.
chatSessionProperties
ConversationPropertiesThe session properties.