Session
@julep/sdk / Modules / managers/session / SessionsManager
Class: SessionsManager
managers/session.SessionsManager
BaseManager serves as the base class for all manager classes that interact with the Julep API. It provides common functionality needed for API interactions.
Hierarchy
↳
SessionsManager
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new SessionsManager(apiClient
): SessionsManager
Constructs a new instance of BaseManager.
Parameters
apiClient
The JulepApiClient instance used for API interactions.
Returns
Inherited from
Defined in
Properties
apiClient
• apiClient: JulepApiClient
The JulepApiClient instance used for API interactions.
Inherited from
Defined in
Methods
chat
▸ chat(sessionId
, «destructured»
): Promise
<ChatResponse
>
Parameters
sessionId
string
«destructured»
Returns
Promise
<ChatResponse
>
Defined in
create
▸ create(«destructured»
): Promise
<ResourceCreatedResponse
>
Parameters
«destructured»
Returns
Promise
<ResourceCreatedResponse
>
Defined in
delete
▸ delete(sessionId
): Promise
<void
>
Parameters
sessionId
string
Returns
Promise
<void
>
Defined in
deleteHistory
▸ deleteHistory(sessionId
): Promise
<void
>
Parameters
sessionId
string
Returns
Promise
<void
>
Defined in
get
▸ get(sessionId
): Promise
<Session
>
Retrieves a session by its ID.
Parameters
sessionId
string
The unique identifier of the session.
Returns
Promise
<Session
>
A promise that resolves with the session object.
Defined in
history
▸ history(sessionId
, «destructured»?
): Promise
<ChatMLMessage
[]>
Parameters
sessionId
string
undefined
«destructured»
Object
{}
› limit?
number
100
› offset?
number
0
Returns
Promise
<ChatMLMessage
[]>
Defined in
list
▸ list(«destructured»?
): Promise
<Session
[]>
Parameters
«destructured»
Object
{}
› limit?
number
100
› metadataFilter?
Object
{}
› offset?
number
0
Returns
Promise
<Session
[]>
Defined in
suggestions
▸ suggestions(sessionId
, «destructured»?
): Promise
<Suggestion
[]>
Parameters
sessionId
string
undefined
«destructured»
Object
{}
› limit?
number
100
› offset?
number
0
Returns
Promise
<Suggestion
[]>
Defined in
update
▸ update(sessionId
, «destructured»
, overwrite?
): Promise
<ResourceUpdatedResponse
>
Parameters
sessionId
string
undefined
«destructured»
Object
undefined
› metadata?
any
{}
› situation
string
undefined
overwrite
boolean
false
Returns
Promise
<ResourceUpdatedResponse
>
Defined in
Last updated