13 lines
260 B
TypeScript
13 lines
260 B
TypeScript
import Replicate from "replicate";
|
|
|
|
let replicateClient: Replicate;
|
|
|
|
export const getReplicateClient = () => {
|
|
if (!replicateClient) {
|
|
replicateClient = new Replicate({
|
|
auth: process.env.REPLICATE_API_TOKEN,
|
|
});
|
|
}
|
|
return replicateClient;
|
|
}
|