Update misskey-js
This commit is contained in:
7
index.ts
7
index.ts
@@ -1,9 +1,8 @@
|
||||
import { parseArgs } from "node:util";
|
||||
|
||||
import { api } from "misskey-js";
|
||||
import type { Stream as MisskeyStream } from "misskey-js";
|
||||
import { Stream } from "misskey-js";
|
||||
import type { Note } from "misskey-js/entities.js";
|
||||
import Stream from "./misskey-js/streaming";
|
||||
|
||||
import OpenAI from "openai";
|
||||
import type { ChatCompletionMessageParam } from "openai/resources/index.js";
|
||||
@@ -209,7 +208,7 @@ async function processJob(job: Job) {
|
||||
|
||||
const jobs: Job[] = [];
|
||||
|
||||
let stream: MisskeyStream;
|
||||
let stream: Stream;
|
||||
let channel: ReturnType<typeof stream.useChannel<"main">>;
|
||||
|
||||
/** dispose stream for recreation */
|
||||
@@ -230,7 +229,7 @@ function initializeStream() {
|
||||
{
|
||||
binaryType: "arraybuffer",
|
||||
},
|
||||
) as unknown as MisskeyStream;
|
||||
);
|
||||
channel = stream.useChannel("main");
|
||||
|
||||
// notify when connected
|
||||
|
||||
Reference in New Issue
Block a user