Comments (4)
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.
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):
Provider
: https://github.com/nvms/wingman/blob/8817a200a0fa674e066ec2519e96bdb639cd10a2/src/providers/index.tsOpenAIProvider
: https://github.com/nvms/wingman/blob/8817a200a0fa674e066ec2519e96bdb639cd10a2/src/providers/openai.ts
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.
@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.
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:Lines 202 to 204 in b93e22b
from wingman.
Related Issues (20)
- Support configurable inference params per prompt HOT 8
- Context window and max_tokens management
- Disable the copy icon when generating HOT 1
- Write function comment prompt: ask before injecting the response into the file HOT 1
- New Goinfer provider HOT 3
- New Koboldcpp provider HOT 10
- Great Job! HOT 1
- A new theme sharing HOT 1
- Please include the julia language (.jl) extension also. HOT 1
- Wingman v2.0.8 , Local model is not supporting HOT 4
- Using the new version with local open source backends HOT 5
- Discussion: modelfusion HOT 2
- Missing Implementation of 'file' Placeholder as Mentioned in README HOT 1
- Feature Request: Enhance Contextual Understanding by Allowing Code File Integration
- Feature Request: Integration of Azure OpenAI Credentials Support HOT 1
- The selected code is forcibly replaced. HOT 4
- Model Installed in VS Code but No Settings No Logo in Sidebar Menu HOT 8
- `Error: Failed to open completion stream: 429 Too Many Requests` HOT 2
- Feature Request: Support Anthropic messages API
- Remove restriction on Ollama models
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wingman.