feat: add JSON-LD Schema Markup with AI generation#5506
feat: add JSON-LD Schema Markup with AI generation#5506Jannih wants to merge 2 commits intowebstudio-is:mainfrom
Conversation
ai generated schema markup
fix type check
kof
left a comment
There was a problem hiding this comment.
Wow just saw what you did here 😅
Problem is we haven't built the new AI integration yet and there needs to be:
- defined which provider we want to use, probably vercel gateway to have access to many models
- how payments are going to work, we can't just connect latest model for free for users, only a cheap model would be possible, not big latest LLM, otherwise it will potentially cost more than we get from users.
- Billing that we have implemented for inception along with a new login needs to be used for paying AI credits.
These are the thoughts so far. Please next time discuss in detail with us the feature to avoid building something we can't really merge yet.
|
MAybe for starters we could merge JSONLD editing without AI and put AI on the next step for this? |
| value: schemaMarkup, | ||
| }); | ||
| }} | ||
| pageContext={{ |
There was a problem hiding this comment.
hmm, you are not providing the entire page content, what am I missing?
There was a problem hiding this comment.
Hey @kof !
Yes, i intentionally did not send the entire page content. The same reason you mentioned, the model costs, but if we go with a cheap model we should definitely include the page content for better results, even if the cost concern is actually minimal since schema generation is typically a one-time action per page, not continuous usage.
But regarding the AI integration: Yes, makes sense to merge JSON-LD editing without AI first. I can adapt the PR to remove the AI generation feature and keep just the manual schema editing capability.
Should I update the PR to remove the AI parts?
|
In order to decide which schema to use, and then populate it with the appropriate data from the page, the AI needs to have access to schema.org specs, and the page data. There are indeed FREE AI models that could handle this and do the entire structured data generation — eg., there are some fee models available through OpenRouter which we use for testing, and they have performed successfully for us in the past. |
|
@kof and @Jannih what about a BYOK approach? Wouldn't it be interesting to have people simply configure their LLM provider endpoint, its API keys and model to use to manipulate the schemas? As long as the provider's endpoint is OpenAI-format compatible - like https://www.litellm.ai/, it shouldn't be much of a hassle to implement and evolve from there (payments, billings, then offer this through Webstudio itself) |
@kof This is a really good idea I think. |
Description
Closes #5443
Adds per-page JSON-LD structured data (Schema Markup) configuration in Page Settings with AI-powered generation.
Features:
<script type="application/ld+json">Technical:
schemaMarkupfield in page meta schemaSchemaMarkupcomponent for builder UIPageSettingsSchemaMarkupcomponent for runtime renderingOPENAI_KEYenv variable)Steps for reproduction
<head>Code Review
Before requesting a review
Before merging
.envfileOPENAI_KEY- Required for AI schema generationOPENAI_ORG- Optional OpenAI organization ID