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
Name | Type | Description |
---|---|---|
| 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
, input
): Promise
<ChatResponse
>
Parameters
Name | Type |
---|---|
|
|
|
Returns
Promise
<ChatResponse
>
Defined in
create
βΈ create(payload
): Promise
<ResourceCreatedResponse
>
Parameters
Name | Type |
---|---|
|
Returns
Promise
<ResourceCreatedResponse
>
Defined in
delete
βΈ delete(sessionId
): Promise
<void
>
Parameters
Name | Type |
---|---|
|
|
Returns
Promise
<void
>
Defined in
deleteHistory
βΈ deleteHistory(sessionId
): Promise
<void
>
Parameters
Name | Type |
---|---|
|
|
Returns
Promise
<void
>
Defined in
get
βΈ get(sessionId
): Promise
<Session
>
Retrieves a session by its ID.
Parameters
Name | Type | Description |
---|---|---|
|
| The unique identifier of the session. |
Returns
Promise
<Session
>
A promise that resolves with the session object.
Defined in
history
βΈ history(sessionId
, options?
): Promise
<ChatMLMessage
[]>
Parameters
Name | Type |
---|---|
|
|
|
|
|
|
|
|
Returns
Promise
<ChatMLMessage
[]>
Defined in
list
βΈ list(options?
): Promise
<Session
[]>
Parameters
Name | Type |
---|---|
|
|
|
|
|
|
|
|
Returns
Promise
<Session
[]>
Defined in
suggestions
βΈ suggestions(sessionId
, options?
): Promise
<Suggestion
[]>
Parameters
Name | Type |
---|---|
|
|
|
|
|
|
|
|
Returns
Promise
<Suggestion
[]>
Defined in
update
βΈ update(sessionId
, options
, overwrite?
): Promise
<ResourceUpdatedResponse
>
Parameters
Name | Type | Default value |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Returns
Promise
<ResourceUpdatedResponse
>
Defined in
Last updated