-
Notifications
You must be signed in to change notification settings - Fork 450
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
Added Support for the new /fim/completions route on Mistral AI API #467
Added Support for the new /fim/completions route on Mistral AI API #467
Conversation
Thank you for the contribution @keshavkrishna will review this soon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, will have to checkout in local and test the changes.
@VisargD do you think we should refactor the handlers to be more generic?
I think this is okay because we will not be seeing new types of inference endpoints that often, but new handlers feel redundant
Hey @keshavkrishna! Will you be able to take a look at the comments? And please update your branch with the latest main branch changes |
Yes I will take care of these comments by this weekend. Is that timeline okay? |
Hey. Is it not possible to reuse the existing /chat/completions route? We can passthrough all the extra key as it is |
Requests to the existing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving only need to make one last change as mentioned in prev comment
We can accept a new header EDIT: Adding extra details
|
Sure, I'll implement this |
If I am not getting
so i have passed requestHeaders in Is that okay?? |
Hey! specific headers checks might not be required. Here is what you can do:
Please let me know if you want an example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this working? I've noticed you've not made any changes in providers/mistral-ai/index.ts
for request and response transformers
Yes it is. We are using chatComplete transforms as per visarg's comment. |
@keshavkrishna - Can you please run |
@VisargD as requested i have updated my branch and also formatted it |
Support new
/fim/completions
route on Mistral AI API:Description:
/fim/completions
endpoint work in the same way as the/chat/completions
route. It handles extra parameters such assuffix
,prompt
also.fimCompletionsHandler
to handle requests to the/fim/completions
endpoint.fimComplete
endpoint.fimComplete
function in Mistral AI.v1//fim/completions
with request validation.Motivation:
/fim/completions
route on Mistral AI APIRelated Issues:
/fim/completions
route on Mistral API #381