/* tslint:disable */
/* eslint-disable */

/* auto-generated by NAPI-RS */

export interface RwkvInvocation {
  maxPredictLength: number
  topP: number
  temp: number
  endToken?: number
  endString?: string
  seed?: number
  prompt: string
  isSkipGeneration?: boolean
  sessionFilePath?: string
  isOverwriteSessionFile?: boolean
  presencePenalty?: number
  frequencyPenalty?: number
}
export interface InferenceToken {
  token: string
  completed: boolean
}
export const enum InferenceResultType {
  Error = 'Error',
  Data = 'Data',
  End = 'End'
}
export interface InferenceResult {
  type: InferenceResultType
  data?: InferenceToken
  message?: string
}
export type RWKV = Rwkv
export class Rwkv {
  static load(modelPath: string, tokenizerPath: string, nThreads: number, enableLogger: boolean): Promise<Rwkv>
  tokenize(params: string): Promise<Array<number>>
  inference(params: RwkvInvocation, callback: (result: InferenceResult) => void): () => void
}
