companionbot 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/ai/claude.js +5 -11
  2. package/package.json +1 -1
package/dist/ai/claude.js CHANGED
@@ -86,7 +86,8 @@ export function calculateTokenBudgets(modelId, thinkingLevel, inputTokens) {
86
86
  }
87
87
  return { maxTokens, thinkingBudget };
88
88
  }
89
- export async function chat(messages, systemPrompt, modelId = "sonnet", thinkingLevel = "medium") {
89
+ export async function chat(messages, systemPrompt, modelId = "sonnet", _thinkingLevel // 사용 안 함 (non-streaming에서 에러 발생)
90
+ ) {
90
91
  const client = getClient();
91
92
  const modelConfig = MODELS[modelId];
92
93
  const toolsUsed = [];
@@ -111,10 +112,10 @@ export async function chat(messages, systemPrompt, modelId = "sonnet", thinkingL
111
112
  }
112
113
  return total;
113
114
  };
114
- // 동적 토큰 budget 계산
115
+ // 토큰 계산 (thinking 비활성화 - non-streaming에서 에러 발생)
115
116
  const inputTokens = estimateInputTokens();
116
- const { maxTokens, thinkingBudget } = calculateTokenBudgets(modelId, thinkingLevel, inputTokens);
117
- console.log(`[Chat] model=${modelId}, thinking=${thinkingLevel}, input~${inputTokens}, maxTokens=${maxTokens}, budget=${thinkingBudget}`);
117
+ const maxTokens = 8192;
118
+ console.log(`[Chat] model=${modelId}, input~${inputTokens}, maxTokens=${maxTokens}`);
118
119
  // API 요청 파라미터 빌드 (도구 루프에서도 동일하게 사용)
119
120
  const buildRequestParams = () => {
120
121
  const params = {
@@ -126,13 +127,6 @@ export async function chat(messages, systemPrompt, modelId = "sonnet", thinkingL
126
127
  if (systemPrompt) {
127
128
  params.system = systemPrompt;
128
129
  }
129
- // thinking 활성화 (budget > 0인 경우)
130
- if (thinkingBudget > 0) {
131
- params.thinking = {
132
- type: "enabled",
133
- budget_tokens: thinkingBudget,
134
- };
135
- }
136
130
  return params;
137
131
  };
138
132
  let response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "companionbot",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "AI 친구 텔레그램 봇 - Claude API 기반 개인화된 대화 상대",
5
5
  "keywords": [
6
6
  "telegram",