mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
Implemented feedback, removing explict defaults as this comes from package.json
This commit is contained in:
parent
f2d741d01f
commit
2661f5e8e1
2 changed files with 3 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ export type ApiConfig = {
|
|||
anthropic: {
|
||||
apikey: string,
|
||||
model: string,
|
||||
maxTokens: number
|
||||
maxTokens: string
|
||||
},
|
||||
openai: {
|
||||
apikey: string
|
||||
|
|
@ -62,12 +62,11 @@ type SendLLMMessageFnTypeExternal = (params: {
|
|||
// Claude
|
||||
const sendClaudeMsg: SendLLMMessageFnTypeInternal = ({ messages, onText, onFinalMessage, apiConfig }) => {
|
||||
|
||||
|
||||
const anthropic = new Anthropic({ apiKey: apiConfig.anthropic.apikey, dangerouslyAllowBrowser: true }); // defaults to process.env["ANTHROPIC_API_KEY"]
|
||||
|
||||
const stream = anthropic.messages.stream({
|
||||
model: apiConfig.anthropic.model,
|
||||
max_tokens: apiConfig.anthropic.maxTokens,
|
||||
max_tokens: parseInt(apiConfig.anthropic.maxTokens),
|
||||
messages: messages,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ const getApiConfig = () => {
|
|||
anthropic: {
|
||||
apikey: vscode.workspace.getConfiguration('void').get('anthropicApiKey') ?? '',
|
||||
model: vscode.workspace.getConfiguration('void').get('anthropicModel') ?? '',
|
||||
maxTokens: vscode.workspace.getConfiguration('void').get('anthropicMaxToken') ?? 1024,
|
||||
maxTokens: vscode.workspace.getConfiguration('void').get('anthropicMaxToken') ?? '',
|
||||
},
|
||||
openai: { apikey: vscode.workspace.getConfiguration('void').get('openAIApiKey') ?? '' },
|
||||
greptile: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue