-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Support for Cohere Command R on Bedrock (fixes #11)
- Loading branch information
Showing
4 changed files
with
90 additions
and
61 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
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
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,67 @@ | ||
import { ClaudeMessagesPrompt } from "@llumiverse/core/formatters"; | ||
|
||
export interface LLama2RequestPayload { | ||
prompt: string; | ||
temperature: number; | ||
top_p?: number; | ||
max_gen_len: number; | ||
} | ||
export interface ClaudeRequestPayload extends ClaudeMessagesPrompt { | ||
anthropic_version: "bedrock-2023-05-31"; | ||
max_tokens: number; | ||
prompt: string; | ||
temperature?: number; | ||
top_p?: number; | ||
top_k?: number; | ||
stop_sequences?: [string]; | ||
} | ||
export interface AI21RequestPayload { | ||
prompt: string; | ||
temperature: number; | ||
maxTokens: number; | ||
} | ||
export interface CohereRequestPayload { | ||
prompt: string; | ||
temperature: number; | ||
max_tokens?: number; | ||
p?: number; | ||
} | ||
export interface AmazonRequestPayload { | ||
inputText: string; | ||
textGenerationConfig: { | ||
temperature: number; | ||
topP: number; | ||
maxTokenCount: number; | ||
stopSequences: [string]; | ||
}; | ||
} | ||
export interface MistralPayload { | ||
prompt: string; | ||
temperature: number; | ||
max_tokens: number; | ||
top_p?: number; | ||
top_k?: number; | ||
} | ||
|
||
export interface CohereCommandRPayload { | ||
|
||
message: string, | ||
chat_history?: { | ||
role: 'USER' | 'CHATBOT', | ||
message: string }[], | ||
documents?: { title: string, snippet: string }[], | ||
search_queries_only?: boolean, | ||
preamble?: string, | ||
max_tokens: number, | ||
temperature?: number, | ||
p?: number, | ||
k?: number, | ||
prompt_truncation?: string, | ||
frequency_penalty?: number, | ||
presence_penalty?: number, | ||
seed?: number, | ||
return_prompt?: boolean, | ||
stop_sequences?: string[], | ||
raw_prompting?: boolean | ||
|
||
} |
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