Skip to content

Commit

Permalink
feat: added new models (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavidop authored Oct 22, 2024
1 parent 902bc00 commit 098604e
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 3 deletions.
91 changes: 88 additions & 3 deletions src/github_llms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,38 @@ export const metaLlama318bInstruct = modelRef({
configSchema: GenerationCommonConfigSchema,
});

export const metaLlama3211bVisionInstruct = modelRef({
name: "github/meta-llama-3.2-11b-vision-instruct",
info: {
versions: ["Llama-3.2-11B-Vision-Instruct"],
label: "Meta - Llama-3.2-11b-vision-instructt",
supports: {
multiturn: true,
tools: true,
media: true,
systemRole: true,
output: ["text", "json"],
},
},
configSchema: GenerationCommonConfigSchema,
});

export const metaLlama3290bVisionInstruct = modelRef({
name: "github/meta-llama-3.2-90b-vision-instruct",
info: {
versions: ["Llama-3.2-90B-Vision-Instruct"],
label: "Meta - Llama-3.2-90b-vision-instructt",
supports: {
multiturn: true,
tools: true,
media: true,
systemRole: true,
output: ["text", "json"],
},
},
configSchema: GenerationCommonConfigSchema,
});

export const cohereCommandR = modelRef({
name: "github/cohere-command-r",
info: {
Expand All @@ -205,6 +237,22 @@ export const cohereCommandR = modelRef({
configSchema: GenerationCommonConfigSchema,
});

export const cohereCommandR082024 = modelRef({
name: "github/cohere-command-r",
info: {
versions: ["Cohere-command-r-08-2024"],
label: "Cohere - Command-r-08-2024",
supports: {
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text", "json"],
},
},
configSchema: GenerationCommonConfigSchema,
});

export const cohereCommandRPlus = modelRef({
name: "github/cohere-command-r-plus",
info: {
Expand All @@ -221,6 +269,22 @@ export const cohereCommandRPlus = modelRef({
configSchema: GenerationCommonConfigSchema,
});

export const cohereCommandRPlus082024 = modelRef({
name: "github/cohere-command-r",
info: {
versions: ["Cohere-command-r-plus-08-2024"],
label: "Cohere - Command-r-plus-08-2024",
supports: {
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text", "json"],
},
},
configSchema: GenerationCommonConfigSchema,
});

export const mistralSmall = modelRef({
name: "github/mistral-small",
info: {
Expand Down Expand Up @@ -398,9 +462,9 @@ export const microsoftPhi3Medium4kInstruct = modelRef({
});

export const microsoftPhi35Mini128kInstruct = modelRef({
name: "github/phi-3.5-mini-128k-instruct",
name: "github/phi-3.5-mini-instruct",
info: {
versions: ["Phi-3.5-mini-128k-instruct"],
versions: ["Phi-3.5-mini-instruct"],
label: "Microsoft - Phi-3.5-mini-128k-instruct",
supports: {
multiturn: true,
Expand All @@ -413,6 +477,22 @@ export const microsoftPhi35Mini128kInstruct = modelRef({
configSchema: GenerationCommonConfigSchema,
});

export const microsoftPhi35MoE128kInstruct = modelRef({
name: "github/phi-3.5-moe-instruct",
info: {
versions: ["Phi-3.5-moe-instruct"],
label: "Microsoft - Phi-3.5-moe-128k-instruct",
supports: {
multiturn: true,
tools: true,
media: false,
systemRole: true,
output: ["text", "json"],
},
},
configSchema: GenerationCommonConfigSchema,
});

export const SUPPORTED_GITHUB_MODELS: Record<string, any> = {
"gpt-4o": openAIGpt4o,
"gpt-4o-mini": openAIGpt4oMini,
Expand All @@ -423,8 +503,12 @@ export const SUPPORTED_GITHUB_MODELS: Record<string, any> = {
"meta-llama-3.1-405b-instruct": metaLlama31405bInstruct,
"meta-llama-3.1-70b-instruct": metaLlama3170bInstruct,
"meta-llama-3.1-8b-instruct": metaLlama318bInstruct,
"Llama-3.2-11B-Vision-Instruct": metaLlama3211bVisionInstruct,
"Llama-3.2-90B-Vision-Instruct": metaLlama3290bVisionInstruct,
"cohere-command-r": cohereCommandR,
"cohere-command-r-plus": cohereCommandRPlus,
"cohere-command-r-08-2024": cohereCommandR082024,
"cohere-command-r-plus-08-2024": cohereCommandRPlus082024,
"Mistral-small": mistralSmall,
"Mistral-large": mistralLarge,
"Mistral-large-2407": mistralLarge2407,
Expand All @@ -436,7 +520,8 @@ export const SUPPORTED_GITHUB_MODELS: Record<string, any> = {
"Phi-3-small-8k-instruct": microsoftPhi3Small8kInstruct,
"Phi-3-small-128k-instruct": microsoftPhi3Small128kInstruct,
"Phi-3-medium-4k-instruct": microsoftPhi3Medium4kInstruct,
"Phi-3.5-mini-128k-instruct": microsoftPhi35Mini128kInstruct,
"Phi-3.5-mini-instruct": microsoftPhi35Mini128kInstruct,
"Phi-3.5-moe-instruct": microsoftPhi35MoE128kInstruct,
};

function toGithubRole(role: Role): string {
Expand Down
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { genkitPlugin, Plugin } from "@genkit-ai/core";
import ModelClient from "@azure-rest/ai-inference";
import { AzureKeyCredential } from "@azure/core-auth";
import { microsoftPhi35MoE128kInstruct, cohereCommandR082024, cohereCommandRPlus082024, metaLlama3211bVisionInstruct, metaLlama3290bVisionInstruct } from './github_llms';
import {
githubModel,
openAIGpt4o,
Expand Down Expand Up @@ -47,8 +48,12 @@ export {
metaLlama31405bInstruct,
metaLlama3170bInstruct,
metaLlama318bInstruct,
metaLlama3211bVisionInstruct,
metaLlama3290bVisionInstruct,
cohereCommandRPlus,
cohereCommandR,
cohereCommandR082024,
cohereCommandRPlus082024,
mistralSmall,
mistralLarge,
mistralLarge2407,
Expand All @@ -61,6 +66,7 @@ export {
microsoftPhi3Small128kInstruct,
microsoftPhi3Medium4kInstruct,
microsoftPhi35Mini128kInstruct,
microsoftPhi35MoE128kInstruct
};

export {
Expand Down

0 comments on commit 098604e

Please sign in to comment.