Type alias ConvexChatMessageHistoryInput<DataModel, TableName, IndexName, SessionIdFieldName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>

ConvexChatMessageHistoryInput<DataModel, TableName, IndexName, SessionIdFieldName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>: {
    ctx: GenericActionCtx<DataModel>;
    sessionId: DocumentByName<DataModel, TableName>[SessionIdFieldName];
    deleteMany?: DeleteManyMutation;
    index?: IndexName;
    insert?: InsertMutation;
    lookup?: LookupQuery;
    messageTextFieldName?: MessageTextFieldName;
    sessionIdField?: SessionIdFieldName;
    table?: TableName;
}

Type that defines the config required to initialize the ConvexChatMessageHistory class. At minimum it needs a sessionId and an ActionCtx.

Type Parameters

  • DataModel extends GenericDataModel

  • TableName extends TableNamesInDataModel<DataModel> = "messages"

  • IndexName extends IndexNames<NamedTableInfo<DataModel, TableName>> = "bySessionId"

  • SessionIdFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>> = "sessionId"

  • MessageTextFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>> = "message"

  • InsertMutation extends FunctionReference<"mutation", "internal", {
        document: object;
        table: string;
    }> = any

  • LookupQuery extends FunctionReference<"query", "internal", {
        index: string;
        key: string;
        keyField: string;
        table: string;
    }, object[]> = any

  • DeleteManyMutation extends FunctionReference<"mutation", "internal", {
        index: string;
        key: string;
        keyField: string;
        table: string;
    }> = any

Type declaration

  • Readonly ctx: GenericActionCtx<DataModel>
  • Readonly sessionId: DocumentByName<DataModel, TableName>[SessionIdFieldName]
  • Optional Readonly deleteMany?: DeleteManyMutation

    Defaults to internal.langchain.db.deleteMany

  • Optional Readonly index?: IndexName

    Defaults to "bySessionId"

  • Optional Readonly insert?: InsertMutation

    Defaults to internal.langchain.db.insert

  • Optional Readonly lookup?: LookupQuery

    Defaults to internal.langchain.db.lookup

  • Optional Readonly messageTextFieldName?: MessageTextFieldName

    Defaults to "message"

  • Optional Readonly sessionIdField?: SessionIdFieldName

    Defaults to "sessionId"

  • Optional Readonly table?: TableName

    Defaults to "messages"

Generated using TypeDoc