Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cohere endpoints & response template #415

Merged
merged 20 commits into from
Aug 29, 2024

Conversation

b4s36t4
Copy link
Contributor

@b4s36t4 b4s36t4 commented Jun 28, 2024

Title: Deprecate /generate endpoint for cohere provider

  • Updates cohere endpoints in favour of depreciating generate endpoint.

Motivation: (optional)

  • Why this change is necessary or beneficial

Related Issues: (optional)
/closes #321

Copy link
Contributor

@narengogi narengogi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've checked out your branch and ran a test, but it fails.
Please find attached relevant curl request

curl --location 'http://localhost:8787/v1/chat/completions' \
--header 'x-portkey-provider: cohere' \
--header 'Authorization: $COHERE_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "model": "command-r-plus",
    "max_tokens": 200,
    "stream": false,
    "messages": [
      {
        "role": "system",
        "content": "You are a helpful assistant"
    },
          {
        "role": "user",
        "content": "Hello Alfred, how are you?"
    }
    ]
}'

package-lock.json Outdated Show resolved Hide resolved
@VisargD VisargD merged commit 81d2d63 into Portkey-AI:main Aug 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Cohere to new endpoint
3 participants