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

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new SessionsManager(apiClient): SessionsManager

Constructs a new instance of BaseManager.

Parameters

NameTypeDescription

apiClient

The JulepApiClient instance used for API interactions.

Returns

SessionsManager

Inherited from

BaseManager.constructor

Defined in

src/managers/base.ts:12

Properties

apiClient

apiClient: JulepApiClient

The JulepApiClient instance used for API interactions.

Inherited from

BaseManager.apiClient

Defined in

src/managers/base.ts:12

Methods

chat

chat(sessionId, «destructured»): Promise<ChatResponse>

Parameters

NameType

sessionId

string

«destructured»

Returns

Promise<ChatResponse>

Defined in

src/managers/session.ts:105


create

create(«destructured»): Promise<ResourceCreatedResponse>

Parameters

NameType

«destructured»

Returns

Promise<ResourceCreatedResponse>

Defined in

src/managers/session.ts:33


delete

delete(sessionId): Promise<void>

Parameters

NameType

sessionId

string

Returns

Promise<void>

Defined in

src/managers/session.ts:84


deleteHistory

deleteHistory(sessionId): Promise<void>

Parameters

NameType

sessionId

string

Returns

Promise<void>

Defined in

src/managers/session.ts:189


get

get(sessionId): Promise<Session>

Retrieves a session by its ID.

Parameters

NameTypeDescription

sessionId

string

The unique identifier of the session.

Returns

Promise<Session>

A promise that resolves with the session object.

Defined in

src/managers/session.ts:29


history

history(sessionId, «destructured»?): Promise<ChatMLMessage[]>

Parameters

NameTypeDefault value

sessionId

string

undefined

«destructured»

Object

{}

limit?

number

100

offset?

number

0

Returns

Promise<ChatMLMessage[]>

Defined in

src/managers/session.ts:174


list

list(«destructured»?): Promise<Session[]>

Parameters

NameTypeDefault value

«destructured»

Object

{}

limit?

number

100

metadataFilter?

Object

{}

offset?

number

0

Returns

Promise<Session[]>

Defined in

src/managers/session.ts:64


suggestions

suggestions(sessionId, «destructured»?): Promise<Suggestion[]>

Parameters

NameTypeDefault value

sessionId

string

undefined

«destructured»

Object

{}

limit?

number

100

offset?

number

0

Returns

Promise<Suggestion[]>

Defined in

src/managers/session.ts:159


update

update(sessionId, «destructured», overwrite?): Promise<ResourceUpdatedResponse>

Parameters

NameTypeDefault value

sessionId

string

undefined

«destructured»

Object

undefined

metadata?

any

{}

situation

string

undefined

overwrite

boolean

false

Returns

Promise<ResourceUpdatedResponse>

Defined in

src/managers/session.ts:90

Last updated