mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Add login key system
This commit is contained in:
@@ -27,6 +27,7 @@ function convertContentToAnthropic(content: any): ContentBlockParam[] {
|
||||
export interface AnthropicApiKey {
|
||||
key: string;
|
||||
isUser: boolean;
|
||||
userLoginKey?: string;
|
||||
}
|
||||
export interface AnthropicCall {
|
||||
systemPrompt: string;
|
||||
@@ -52,6 +53,7 @@ const callAnthropic = wrapWithSpan(
|
||||
"llm.chat.calls": 1, // so we can SUM(llm.chat.calls) without doing a COUNT + filter
|
||||
"llm.chat.num_messages": messages.length,
|
||||
"llm.chat.is_user_api_key": apiKey.isUser,
|
||||
"llm.chat.user_login_key": apiKey.userLoginKey,
|
||||
});
|
||||
|
||||
const anthropic = new Anthropic({ apiKey: apiKey.key });
|
||||
|
||||
Reference in New Issue
Block a user