mistralai / mistral-common

Apache License 2.0
633 stars 57 forks source link

[IMPORT ERROR : ChatCompletionRequest] #24

Closed ashishakkumar closed 3 months ago

ashishakkumar commented 3 months ago

Python -VV

NOT REQUIRED

Pip Freeze

NOT REQUIRED

Reproduction Steps

NOT REQUIRED

Expected Behavior

As per the documentation,

ISSUE : the import is to be done like this : from mistral_common.tokens.instruct.normalize import ChatCompletionRequest

RESOLUTION : from mistral_common.protocol.instruct.request import ChatCompletionRequest

Additional Context

No response

Suggested Solutions

No response

ashishakkumar commented 3 months ago

Please change _from mistralcommon.tokens.instruct.normalize import ChatCompletionRequest to _from mistralcommon.protocol.instruct.request import ChatCompletionRequest

pandora-s-git commented 3 months ago

Hi @ashishakkumar , could you tell us where exactly you see this import? As the documentation has been fixed some time ago.

ashishakkumar commented 3 months ago

@pandora-s-git

Yes now it's fixed : https://docs.mistral.ai/guides/tokenization/#run-our-tokenizer-in-python

Screenshot 2024-07-08 at 1 42 24 PM