-
Notifications
You must be signed in to change notification settings - Fork 0
/
service.ts
66 lines (54 loc) · 2.12 KB
/
service.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import {
AnimateImageRequest,
ImageRequest,
ImageToImageRequest,
ImagineResponse,
InpaintRequest,
RemoveBackgroundRequest
} from "./images";
import {TextToVideoRequest} from "./videos";
import {FoleyRequest, MusicGenerationRequest, TextToSpeechRequest} from "./audio";
import {TextGenRequest, TextResponse} from "./text";
export interface GenerationService {
/***
Requests a newly generated image from the API based off a text prompt.
***/
makeImage(textToImageRequest: Partial<ImageRequest>): Promise<ImagineResponse | null>
/***
Requests an image generated based off of an original source image from the API.
***/
imageToImage(imageToImageRequest: Partial<ImageToImageRequest>): Promise<ImagineResponse | null>
/***
Requests an animation of an existing image.
***/
animateImage(animateImageRequest: Partial<AnimateImageRequest>): Promise<ImagineResponse | null>
/***
Requests that an image be inpainted with something else.
***/
inpaintImage(inpaintRequest: Partial<InpaintRequest>): Promise<ImagineResponse | null>
/***
Removes the background of the image.
***/
removeBackground(removeRequest: Partial<RemoveBackgroundRequest>): Promise<ImagineResponse | null>
/***
Requests a newly generated video from the API based off a text prompt.
***/
makeVideo(textToVideoRequest: Partial<TextToVideoRequest>): Promise<ImagineResponse | null>
/***
Requests a sound effect.
***/
makeSound(foleyRequest: Partial<FoleyRequest>): Promise<ImagineResponse | null>
/***
Requests text-to-speech with a voice.
***/
speak(textToSpeechRequest: Partial<TextToSpeechRequest>): Promise<ImagineResponse | null>
/***
Requests a song.
***/
makeMusic(textToMusicRequest: Partial<MusicGenerationRequest>): Promise<ImagineResponse | null>
/***
Requests a text generation from whatever model the player is using.
The interface is barebones intentionally, to keep the player's model config.
***/
textGen(textGenRequest: Partial<TextGenRequest>): Promise<TextResponse | null>;
}