Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Dec 12, 2024
2 parents ef72dd2 + 59f44c5 commit 58e2122
Show file tree
Hide file tree
Showing 22 changed files with 19 additions and 333 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "smart-seo-open-ai",
"name": "smart-seo-open-ai-admin",
"main": "src/index.tsx",
"version": "1.0.0",
"keywords": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DecorateContentEntryFormBind = useBind.createDecorator(baseHook =>
const { model } = useModel();

// Skip tracking for non-article models
if (model.modelId !== "article") {
if (model.modelId !== "article-smart-seo") {
return baseHook(params);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { FieldWithValue, useFieldTracker } from "./FieldTracker";
import { extractRichTextHtml } from "./extractFromRichText";
import { useSnackbar } from "@webiny/app-admin";

const OPENAI_API_KEY = String(process.env["REACT_APP_OPEN_AI_API_KEY"]);
const OPENAI_API_KEY = String(process.env["WEBINY_ADMIN_OPEN_AI_API_KEY"]);

const openai = new OpenAI({ apiKey: OPENAI_API_KEY, dangerouslyAllowBrowser: true });

Expand Down Expand Up @@ -120,7 +120,7 @@ export const SmartSeo = () => {
name={"askAi"}
before={"save"}
element={<GetSeoData />}
modelIds={["article"]}
modelIds={["article-smart-seo"]}
/>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "smart-seo-open-ai-api",
"main": "src/index.ts",
"keywords": [
"webiny-extension",
"webiny-extension-type:api"
],
"version": "1.0.0",
"dependencies": {
"@webiny/api-headless-cms": "5.41.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,11 @@ import {

export const Article = () => {
return [
// Defines a new Ungrouped content models group.
createCmsModelPlugin({
name: "Article",
modelId: "article",
name: "Article - Smart SEO",
modelId: "article-smart-seo",
description: "Article content model for Smart SEO",
group: {
id: "673b06847c123c0002c9cfdc",
name: "Ungrouped AI 2"
},
group: {id: "", name: ""},
fields: [
createModelField({
fieldId: "content",
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion headless-cms/smart-seo-open-ai/article.json

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 58e2122

Please sign in to comment.