Welcome to Portkey Forum

Updated 3 months ago

Troubleshooting Cohere Virtual Key Issues

Hi guys, im struggling a little to use cohere on your platform. Fireworks works fine, but when I made a cohere virtual key it stops working.

For example, to create a prompt when I use fireworks it shows me all the models, but when I use cohere it throws an error saying "no foundation models available"

Similarly, when I try to create embeddings using cohere + explicitly naming the model I want to use, it gives me an error as well:

Plain Text
openai.BadRequestError: Error code: 400 - {'error': {'message': 'cohere error: invalid request: valid input_type must be provided with the provided model', 'type': None, 'param': None, 'code': None}, 'provider': 'cohere'}


This is how im using the library to generate embeddings:

Plain Text
    ...
    async def create_embedding(self, input: Union[str, List[str]], model: str):
        return await self._client.embeddings.create(input=input, model=model)
    ...
    
    #USAGE
    client = create_portkey_fireworks_client(client_type="sync", provider="cohere")
    input = ["I am happy", "I am sad"]
    x = client.create_embedding(input, model="embed-multilingual-v3.0")
    print(x)


Please let me know what im doing wrong :/
V
2 comments
Hey @MolBioBoy checking if the embedding issue is fixed.
As for using Cohere with Prompt playground - thanks for raising this. Yes this is a known issue. Can you please share which Cohere model you'd like to try on Portkey prompt playground? Command R+?
Add a reply
Sign up and join the conversation on Discord