Giter Site home page Giter Site logo

leap-sdk-deprecated's People

Contributors

claudfuen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

yomaser manyeya

leap-sdk-deprecated's Issues

Music api is returning null - not sure what I'm doing wrong

export async function POST(req: Request) {

// Removed the API key for this post but it's setup in my instance correctly.
const leap = new Leap(apiKey);

if (!prompt || prompt.length === 0 || !apiKey) {
console.log("Invalid request. Check key and prompt.")
return;
}
if (req.method === 'POST') {
try {
const { data, error } = await leap.music.submitMusicGenerationJob({
prompt: "A suspenseful orchestral piece for a thriller chase scene.",
duration: 30,
});
if (error) {
return {
status: 500,
body: JSON.stringify({ message: 'Internal Server Error' }),
};
}
return {
status: 200,
body: JSON.stringify(data),
};

} catch (err) {
  console.error(err);
  return {
    status: 500,
    body: JSON.stringify({ message: 'Internal Server Error' }),
  };
}

} else {
return {
status: 405,
headers: { Allow: 'POST' },
body: 'Method Not Allowed',
};
}
}

Public models

Thanks, owners for this SDK.

Could you please help with short names for the function to get the correct names to setup modelId as in the example by default:
leap.usePublicModel('sd-1.5');
Here we can setup "sd-1.5" or "future-diffusion"Is it correct?
How to set up by default a realistic vision?
it possible into:
await leap.generate.generateImage({ modelId: '37d42ae9-5f5f-4399-b60b-014d35e762a5' ... )}
but want to use it in the default function.
now I'm getting if provide rv-2.0 as argumets
{ statusCode: 400, message: 'Invalid modelId', error: 'Bad Request' }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.