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: Gemini-1.5 Flash, gpt-4o imports, modelSpec greeting fix #2729

Merged
merged 4 commits into from
May 15, 2024

Conversation

danny-avila
Copy link
Owner

Summary

Closes #2714
Closes #2715
Closes #2718

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

@danny-avila danny-avila changed the title feat: Gemini-1.5 Flash, gpt-4o imports, modelSpec greeting fix ⚡ feat: Gemini-1.5 Flash, gpt-4o imports, modelSpec greeting fix May 15, 2024
@danny-avila danny-avila merged commit fc9368e into main May 15, 2024
4 checks passed
@danny-avila danny-avila deleted the 051524 branch May 15, 2024 13:02
@@ -202,7 +202,7 @@ function processConversation(conv, importBatchBuilder, requestUserId) {
const isCreatedByUser = role === 'user';
let sender = isCreatedByUser ? 'user' : 'GPT-3.5';
const model = mapping.message.metadata.model_slug || openAISettings.model.default;
if (model === 'gpt-4') {
if (model.includes('gpt-4')) {
sender = 'GPT-4';
Copy link

Choose a reason for hiding this comment

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

"Technically", it's GPT-4 and GPT-4o 😅 (ofc I haven't looked up what model looks like)

Copy link
Owner Author

Choose a reason for hiding this comment

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

this works for when the model is vanilla "gpt-4" as well as "gpt-4o"

Copy link
Owner Author

Choose a reason for hiding this comment

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

I see what you mean about differentiating the sender, I'll think about that soon, as that would mean a few other changes app-wide

Copy link

@stdedos stdedos May 15, 2024

Choose a reason for hiding this comment

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

I mean, tbh, I would'be just slapped all gpt-4-1106-preview strings into a huge lookup table (and hide the actual model name e.g. under a hover on the username).

At least for the OpenAI models, that go like

  • gpt-4o-2024-05-13
  • gpt-4-1106-preview
  • gpt-3.5-turbo

I'd try e.g.

function extractUsername(modelName) {
    // Check for specific model name patterns and return corresponding usernames
    if (modelName.startsWith('gpt-4o-')) {
        return 'GPT-4o';
    } else if (modelName.startsWith('gpt-4-')) {
        return 'GPT-4';
    } else if (modelName.startsWith('gpt-3.5-turbo')) {
        return 'GPT-3';
    }

    ...
}

and/or something "smarter" (which ofc you can support with tests)

Ofc, up to you, the project, and your time 🙏 (and things I haven't seen, since I haven't really dug the source)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants