Skip to content

Commit

Permalink
Pass failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amanape committed Nov 11, 2024
1 parent 0907716 commit eda7002
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/__tests__/utils/extractModelAndProvider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ describe("extractModelAndProvider", () => {
separator: "/",
});

expect(extractModelAndProvider("claude-3-5-sonnet-20241022")).toEqual({
expect(extractModelAndProvider("claude-3-5-sonnet-20240620")).toEqual({
provider: "anthropic",
model: "claude-3-5-sonnet-20241022",
model: "claude-3-5-sonnet-20240620",
separator: "/",
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test("organizeModelsAndProviders", () => {
"gpt-4o",
"together-ai-21.1b-41b",
"gpt-4o-mini",
"claude-3-5-sonnet-20241022",
"anthropic/claude-3-5-sonnet-20241022",
"claude-3-haiku-20240307",
"claude-2",
"claude-2.1",
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/utils/organizeModelsAndProviders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { extractModelAndProvider } from "./extractModelAndProvider";
*/
export const organizeModelsAndProviders = (models: string[]) => {
const object: Record<string, { separator: string; models: string[] }> = {};

models.forEach((model) => {
const {
separator,
Expand All @@ -45,5 +46,6 @@ export const organizeModelsAndProviders = (models: string[]) => {
}
object[key].models.push(modelId);
});

return object;
};

0 comments on commit eda7002

Please sign in to comment.