From a01264be7403cc355516408d4d77174eb795dc53 Mon Sep 17 00:00:00 2001 From: jcollier Date: Wed, 25 Oct 2023 09:34:36 +0100 Subject: [PATCH] Make workflow trigger manual and change AI model --- .github/workflows/generate-related.yaml | 2 +- scripts/generate-related/compute-embeddings.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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) => {