diff --git a/.github/workflows/generate-related.yaml b/.github/workflows/generate-related.yaml index 92b9999bd9..ecaa9692e7 100644 --- a/.github/workflows/generate-related.yaml +++ b/.github/workflows/generate-related.yaml @@ -1,7 +1,7 @@ name: Generate Read More related on: - push: + workflow_dispatch: branches: - gh-pages diff --git a/scripts/generate-related/compute-embeddings.js b/scripts/generate-related/compute-embeddings.js index 7ea4ffbd7c..6496d9505a 100644 --- a/scripts/generate-related/compute-embeddings.js +++ b/scripts/generate-related/compute-embeddings.js @@ -43,7 +43,7 @@ const summarisePost = async (data) => { const OPENAI_API_KEY = process.env.npm_config_openai_api_key; return await fetch( - "https://api.openai.com/v1/engines/babbage-similarity/embeddings", + "https://api.openai.com/v1/embeddings", { method: "POST", headers: { @@ -52,6 +52,7 @@ const summarisePost = async (data) => { }, body: JSON.stringify({ input: data, + model: "text-embedding-ada-002" }), }) .then((res) => {