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

Add NovitaAI Provider #303

Merged
merged 1 commit into from
May 1, 2024
Merged

Add NovitaAI Provider #303

merged 1 commit into from
May 1, 2024

Conversation

AnyISalIn
Copy link
Contributor

Add NovitaAI Provider:

NovitaAI is an AI API platform that offers the most favorable pricing for open-source LLM models.

@vrushankportkey
Copy link
Collaborator

Updated the README. @VisargD can review the PR.

getEndpoint: ({ fn }) => {
switch (fn) {
case 'complete':
return '/v1/completions';
Copy link
Collaborator

Choose a reason for hiding this comment

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

end point seems to be incorrect.
please refer to https://novita.ai/get-started/llm.html#example-with-curl-client

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi it's correct, we use the /v3/openai prefix, so the complete URL will be /v3/openai/v1/completion

Copy link
Collaborator

@sk-portkey sk-portkey Apr 17, 2024

Choose a reason for hiding this comment

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

The final url as mentioned in the documentation is https://api.novita.ai/v3/openai/completions
But the above configuration will result in final url being https://api.novita.ai/v3/openai/v1/completions

Nothing in the documentation mentions /v1 being needed

Copy link
Collaborator

Choose a reason for hiding this comment

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

hey! I noticed that both https://api.novita.ai/v3/openai/v1/completions and https://api.novita.ai/v3/openai/completions are behaving similarly. But the novita's official documentation does not mention https://api.novita.ai/v3/openai/v1/completions being the end point as mentioned here https://novita.ai/get-started/llm.html#example-with-curl-client. Can you remove the /v1 so that it is compliant with their official documentation?

src/providers/novita-ai/api.ts Show resolved Hide resolved
src/providers/index.ts Outdated Show resolved Hide resolved
src/providers/novita-ai/chatComplete.ts Show resolved Hide resolved
src/providers/novita-ai/chatComplete.ts Outdated Show resolved Hide resolved
src/providers/novita-ai/complete.ts Show resolved Hide resolved
@sk-portkey
Copy link
Collaborator

Hey @AnyISalIn . Thanks for the PR! Please find the changes requested in comments above. Please let me know if you need any additional details

@AnyISalIn
Copy link
Contributor Author

Hey @AnyISalIn . Thanks for the PR! Please find the changes requested in comments above. Please let me know if you need any additional details

done, can you review again ?

src/providers/novita-ai/complete.ts Show resolved Hide resolved
src/providers/novita-ai/complete.ts Show resolved Hide resolved
src/providers/novita-ai/chatComplete.ts Show resolved Hide resolved
getEndpoint: ({ fn }) => {
switch (fn) {
case 'complete':
return '/v1/completions';
Copy link
Collaborator

Choose a reason for hiding this comment

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

hey! I noticed that both https://api.novita.ai/v3/openai/v1/completions and https://api.novita.ai/v3/openai/completions are behaving similarly. But the novita's official documentation does not mention https://api.novita.ai/v3/openai/v1/completions being the end point as mentioned here https://novita.ai/get-started/llm.html#example-with-curl-client. Can you remove the /v1 so that it is compliant with their official documentation?

@AnyISalIn
Copy link
Contributor Author

@sk-portkey, thank you for your excellent code review. I have fixed these issues and hope that you can review it again.

sk-portkey
sk-portkey previously approved these changes Apr 20, 2024
@sk-portkey
Copy link
Collaborator

looks good to me

@AnyISalIn
Copy link
Contributor Author

AnyISalIn commented Apr 23, 2024

@sk-portkey Hello, when can we merge?

@VisargD
Copy link
Collaborator

VisargD commented Apr 29, 2024

Hey @AnyISalIn - Can you please resolve the merge conflicts?

@AnyISalIn
Copy link
Contributor Author

Hey @AnyISalIn - Can you please resolve the merge conflicts?

It has been fixed

@VisargD
Copy link
Collaborator

VisargD commented Apr 30, 2024

Hey @AnyISalIn - We are merging few other PRs as well. So that caused a merge conflict again. Can you please resolve it again. I will merge the PR asap so no other conflicts occur. Sorry for the inconvenience.

@AnyISalIn
Copy link
Contributor Author

Hey @AnyISalIn - We are merging few other PRs as well. So that caused a merge conflict again. Can you please resolve it again. I will merge the PR asap so no other conflicts occur. Sorry for the inconvenience.

can you checking again ?

src/providers/index.ts Outdated Show resolved Hide resolved
@VisargD
Copy link
Collaborator

VisargD commented Apr 30, 2024

The conflicts were not resolved properly. All the markers of the conflict are still in code. Can you please check them? Please let me know if you need any help.

Signed-off-by: AnyISalIn <anyisalin@gmail.com>
@VisargD VisargD merged commit 29125f8 into Portkey-AI:main May 1, 2024
1 check passed
@VisargD
Copy link
Collaborator

VisargD commented May 1, 2024

Closes #330

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.

4 participants