Skip to content
    Back to all Bounties

    Earn 5,400 ($54.00)

    Time Remainingdue 1 year ago
    Canceled

    How to properly include Vercel AI/SDK in a obsidian plugin

    minutilloivan
    minutilloivan
    Posted 1 year ago

    Bounty Description

    Problem Description

    I'm having issues scaffolding an obsidian plugin that works with Vercel AI/SDK.
    Being Obsidian an electron app, I cannot use a nextjs app out of the box within the plugin directory, everything should be included client side - and I guess this cause some issues with the AI library.

    Acceptance Criteria

    The obsidian plugin should be a vercel AI/SDK hello world.
    It should not use an iframe, because i want to make use of obsidian features.
    I want it to connect to anthropic and openai and make use of generative functions ( using { createAI, getMutableAIState, render } from "ai/rsc";)

    Technical Details

    it can work by hardcoding the apikey, i can later move the apikey and other settings (model, temperature, etc) to the proper obsidian settings panel, I am mostly stuck at properly include the ai/sdk library. I've tried adding a serverproxy for dealing with CORS issues, but i didint managed to get the streams back from the api and include the messages wit the useChat hook