Git Product home page Git Product logo

Comments (4)

nvms avatar nvms commented on September 23, 2024

yes! I absolutely plan to support Claude, just not quite there yet. if you get to it before I do, that's totally cool!

from wingman.

nvms avatar nvms commented on September 23, 2024

I stubbed out support for Claude using the new Provider API, and the OpenAIProvider can serve as an example for how to implement a new provider (if you are interested):

I still don't have access to Claude yet, so apart from the above, I haven't been able to really dig into this yet

from wingman.

capdevc avatar capdevc commented on September 23, 2024

@nvms I've started taking an initial look at this. Full disclosure: I have exactly zero experience with JS/TS or vscode extensions so I'm kind of learning it and the relevant tooling on the go.

The main thing that's blocking me is the fact that the anthropic/claude API has no counterpart to the OpenAI conversation tracking stuff. It's much simpler/more limited. Each request exists on its own and is basically just a single blob of text with alternating User: ... and Assistant: ... blocks. So, for a conversation I'd basically need to manually build the next prompt by keeping the current state somewhere and appending new questions and responses at each step.

It's not clear to me where this state should live, or when/how to clear it.

from wingman.

nvms avatar nvms commented on September 23, 2024

no counterpart to the OpenAI conversation tracking stuff

ah, I wasn't aware of this. I think your method of preserving state is exactly what you'll want to do, then.

maybe something like this?:

  • in create, set state to an empty string (e.g. this.conversationState = "")
  • when a complete response is received, concatenate everything onto this string (e.g. this.conversationState = this.conversationState + "\n\nHuman: <last question>\n\nAssistant: <last reply>"
  • the next time you send a prompt, prefix it with conversationState.
  • the place to clear this state would be the Provider's destroy method, which is called before every new conversation:

    wingman/src/views.ts

    Lines 202 to 204 in b93e22b

    // Every command run should instantiate a new provider, which is why we call destroy here.
    getProviderInstance()?.destroy();
    getProviderInstance()?.create(this as any, command);

from wingman.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.