nvms / wingman

Your pair programming wingman. Supports OpenAI, Anthropic, or any LLM on your local inference server.
https://marketplace.visualstudio.com/items?itemName=nvms.ai-wingman
ISC License
64 stars 10 forks source link

Feature Request: Support Anthropic messages API #38

Open onlurking opened 9 months ago

onlurking commented 9 months ago

The new Claude 3 model family by Anthropic (claude-3-sonnet, claude-3-opus, and claude-3-haiku in the future) is only available in the /messages endpoint.

Usage example:

curl https://api.anthropic.com/v1/messages \
     --header "x-api-key: $ANTHROPIC_API_KEY" \
     --header "anthropic-version: 2023-06-01" \
     --header "content-type: application/json" \
     --data \
'{
    "model": "claude-3-opus-20240229",
    "max_tokens": 1024,
    "messages": [
        {"role": "user", "content": "Hello, world"}
    ]
}'