Unexpected behavior: Error: Invalid version for official models
carafelix opened this issue · 2 comments
Just following the api docs for running an api call for llama-3 outputs:
Invalid version. It must be in the format "owner/name:version"
example copied from the model api reference tab:
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN
});
const input = {
prompt: 'Can you write a poem about open source machine learning?',
};
const output = await replicate.run("meta/meta-llama-3-8b", { input });It's obviously not following the :version flag, but copypasting something from one of the first things you see in the API reference tab should work...
also the api response for getting the llama 3 8b is:
{"status":404,"title":"Not found","detail":"This model is an official model and does not expose a list of versions."}Hi, sorry to hear you're having issues with the API.
Just following the api docs for running an api call for llama-3 outputs:
Invalid version. It must be in the format "owner/name:version"
example copied from the model api reference tab:
I've just copy/pasted your snippet and run it locally and things are working for me.
Can you share more about the version of replicate you have installed?
also the api response for getting the llama 3 8b is…
I just wanted to check how you're making requests to that endpoint.
The endpoint for fetching the model is:
https://api.replicate.com/v1/models/meta/llama-3-8b
Using the SDK this will be:
const model = await replicate.models.get("meta", "llama-3-8b");
console.log(model);The official language models do not have versions so the versions endpoint will not work, and you'll see the error you've shared above.
Can you share more about the version of replicate you have installed?
replicate@0.18.1. Looks like npm i replicate was sourcing me an old version of the package. Looks like the regex check was an issue before and not it's not.
npm i replicate@latest and it's okay