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

feat: add reka ai support #304

Merged
merged 6 commits into from
May 7, 2024
Merged

Conversation

meronogbai
Copy link
Contributor

@meronogbai meronogbai commented Apr 18, 2024

This adds support for reka ai.

Related Issues: (optional)
Closes #302

} from './chatComplete';

const RekaAIConfig: ProviderConfigs = {
chatComplete: RekaAIChatCompleteConfig,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

They don't seem to have a streaming endpoint so I only added chat completion support.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Acknowledged. We have a json to stream function but we can use that in another PR.

@meronogbai meronogbai requested a review from VisargD April 18, 2024 08:47
}
});

if (messages[0].type !== 'human') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Acknowledged

Comment on lines +47 to +49
// NOTE: image need to be first
media_url ? messages.unshift(newMessage) : messages.push(newMessage);
lastType = type;
Copy link
Contributor Author

@meronogbai meronogbai Apr 18, 2024

Choose a reason for hiding this comment

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

There can only be one image in the conversation history. Moreover, we can only use images on the first turn.

See https://docs.reka.ai/guides/002-image-video-audio-chat.html#multiple-turns

Copy link
Collaborator

Choose a reason for hiding this comment

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

Acknowledged

@VisargD
Copy link
Collaborator

VisargD commented May 1, 2024

Hey. Thanks for the PR. Whenever possible, can you please resolve the conflicts.

@VisargD
Copy link
Collaborator

VisargD commented May 2, 2024

Hey @meronogbai - Please look into the merge conflicts whenever possible.

@meronogbai
Copy link
Contributor Author

I’ll tale a look tonight.

@meronogbai
Copy link
Contributor Author

Done 🫡

@VisargD VisargD merged commit a7987cc into Portkey-AI:main May 7, 2024
1 check passed
@meronogbai meronogbai deleted the feat/add-reka-ai branch May 7, 2024 10:24
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.

[Provider] Reka AI
2 participants