refactor: improve OpenAI service and tools
- Enhance OpenAI message types with tool_calls support - Improve security validation and rate limiting - Update utility tools and weather tool - Minor fixes in deposit-agent and domain-register Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,9 @@
|
||||
import type { Env } from '../types';
|
||||
import { retryWithBackoff } from '../utils/retry';
|
||||
import { ERROR_MESSAGES } from '../constants/messages';
|
||||
import { createLogger } from '../utils/logger';
|
||||
|
||||
const logger = createLogger('weather');
|
||||
|
||||
// wttr.in API 응답 타입 정의
|
||||
interface WttrCurrentCondition {
|
||||
@@ -87,6 +90,7 @@ export async function executeWeather(args: { city: string }, env?: Env): Promise
|
||||
습도: ${current.humidity}%
|
||||
풍속: ${current.windspeedKmph} km/h`;
|
||||
} catch (error) {
|
||||
logger.error('날씨 조회 실패', error as Error, { city });
|
||||
return `${ERROR_MESSAGES.WEATHER_SERVICE_UNAVAILABLE}: ${city}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user