Skip to content

Commit

Permalink
added imagegen to aipl-client
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewjosephtaylor committed Sep 11, 2024
1 parent 7749573 commit 7165141
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/client/AiplClients.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { isUndefined, type TypeInfo } from "@mjtdev/engine";
// import { connectWs } from "./connectWs";
import { type AppMessageMap } from "ai-worker-common";
import { type AppMessageMap, type SdApiTxt2ImgRequest } from "ai-worker-common";
import { getBackendUser } from "../backend/user/getBackendUser";
import { startPublicAccessPoint } from "../startPublicAccessPoint";
import { AppMessagesState } from "../state/ws/AppMessagesState";
import { findFirstPapId } from "../ui/overlay/findFirstPapId";
import { log } from "./log";
import { askForGeneratedImages } from "../ai/askForGeneratedImages";

export type AiplClient = ReturnType<typeof createAiplClient>;

Expand Down Expand Up @@ -33,6 +34,12 @@ export const createAiplClient = (
systemMessage,
});
},
askForGeneratedImages: async (
request: Partial<SdApiTxt2ImgRequest> = {},
options: Partial<{ signal: AbortSignal }> = {}
) => {
return askForGeneratedImages(request, options);
},
listAgents: async () => {
const user = await getBackendUser();
if (isUndefined(user)) {
Expand Down

0 comments on commit 7165141

Please sign in to comment.