-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(frontend): uniformize case for types (#2071)
# Description Please include a summary of the changes and the related issue. Please also include relevant motivation and context. ## Checklist before requesting a review Please delete options that are not relevant. - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my code - [ ] I have commented hard-to-understand areas - [ ] I have ideally added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged ## Screenshots (if appropriate):
- Loading branch information
Showing
2 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { UUID } from "crypto"; | ||
|
||
import { ApiBrainDefinition } from "../api/brain/types"; | ||
|
||
export const brainStatuses = ["private", "public"] as const; | ||
|
||
export type BrainStatus = (typeof brainStatuses)[number]; | ||
|
||
export const brainTypes = ["doc", "api", "composite"] as const; | ||
|
||
export type BrainType = (typeof brainTypes)[number]; | ||
|
||
export type Model = (typeof freeModels)[number]; | ||
|
||
// TODO: update this type to match the backend (antropic, openai and some other keys should be removed) | ||
export type BrainConfig = { | ||
id: UUID; | ||
model: Model; | ||
temperature: number; | ||
maxTokens: number; | ||
keepLocal: boolean; | ||
backendUrl?: string; | ||
openAiKey?: string; | ||
anthropicKey?: string; | ||
supabaseUrl?: string; | ||
supabaseKey?: string; | ||
prompt_id?: string; | ||
status: BrainStatus; | ||
brain_type: BrainType; | ||
prompt: { | ||
title: string; | ||
content: string; | ||
}; | ||
name: string; | ||
description: string; | ||
} & { | ||
brain_definition?: ApiBrainDefinition; | ||
}; | ||
|
||
export const openAiFreeModels = [ | ||
"gpt-3.5-turbo", | ||
"gpt-3.5-turbo-1106", | ||
"gpt-3.5-turbo-16k", | ||
] as const; | ||
|
||
export const openAiPaidModels = [...openAiFreeModels, "gpt-4"] as const; | ||
|
||
export const anthropicModels = [ | ||
// "claude-v1", | ||
// "claude-v1.3", | ||
// "claude-instant-v1-100k", | ||
// "claude-instant-v1.1-100k", | ||
] as const; | ||
|
||
export const googleModels = [ | ||
//"vertexai" | ||
] as const; // TODO activate when not in demo mode | ||
|
||
// export const googleModels = [] as const; | ||
export const freeModels = [ | ||
...openAiFreeModels, | ||
// ...anthropicModels, | ||
// ...googleModels, | ||
] as const; | ||
|
||
export const paidModels = [...openAiPaidModels] as const; | ||
|
||
export type PaidModels = (typeof paidModels)[number]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export type Testimonial = { | ||
socialMedia: "x" | "linkedin"; | ||
url: string; | ||
jobTitle: string; | ||
content: string; | ||
name: string; | ||
profilePicture?: string; | ||
}; |