Skip to content

Commit

Permalink
chore(multiple-providers): coming soon select
Browse files Browse the repository at this point in the history
  • Loading branch information
eylonmiz committed Jul 31, 2023
1 parent b721480 commit bbe7b42
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export const ProviderSelector = () => {
};

const renderProvider = (provider: ProviderProps) => {
const isAvailable = provider.value === PromptService.OpenAiChatCompletion;
return {
disabled: !isAvailable,
value: provider.value,
label: (
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { PromptService } from "../../../../../@generated/graphql/graphql";
// Logos
import OpenAILogo from "../../../../../assets/providers/openai-logo.svg";
import AzureOpenAILogo from "../../../../../assets/providers/azure-logo.svg";
import AnthropicOpenAILogo from "../../../../../assets/providers/anthropic-logo.svg";

const Icon = styled.img`
border-radius: 2px;
Expand All @@ -28,6 +29,11 @@ export const providersList: ProviderProps[] = [
value: PromptService.AzureOpenAiChatCompletion,
label: promptProvidersMapping[PromptService.AzureOpenAiChatCompletion].name,
},
{
image: <Icon src={AnthropicOpenAILogo} style={{ padding: 2 }} />,
value: PromptService.AnthropicCompletion,
label: promptProvidersMapping[PromptService.AnthropicCompletion].name,
},
];

/**
Expand Down
1 change: 1 addition & 0 deletions apps/console/src/assets/providers/anthropic-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion libs/types/src/provider.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export const providerDetails = {
[Provider.Azure]: {
name: "Azure",
},
[Provider.Anthropic]: {
name: "Anthropic",
},
};

export const promptProvidersMapping = {
Expand All @@ -26,8 +29,13 @@ export const promptProvidersMapping = {
defaultSettings: {},
},
[PromptService.AzureOpenAIChatCompletion]: {
name: "Azure OpenAI Chat Completion",
name: "Azure OpenAI (coming soon)",
provider: Provider.Azure,
defaultSettings: {},
},
[PromptService.AnthropicCompletion]: {
name: "Anthropic (coming soon)",
provider: Provider.Anthropic,
defaultSettings: {},
},
};

0 comments on commit bbe7b42

Please sign in to comment.