[chore] solution,admin,ontology: 코드 주석을 한 줄로 — 히스토리 주석 삭제
여러 줄 주석이 설명보다 경위(예전·실측·지적)를 적고 있어 읽는 사람이 결론을 찾기 어려웠다. - ts·tsx·js·mjs·css·py 478개: 여러 줄 주석은 첫 문장 한 줄로, 과거형·날짜 문장은 삭제 - 주석 위치는 TypeScript 파서·파이썬 tokenize/ast 로 찾는다 — 문자열 안의 # · /* 는 건드리지 않는다 - eslint·ts·noqa·type: ignore 같은 지시 주석은 그대로 둔다 파이썬 275개 정리 전후 AST 동일, TS 298개 주석 뺀 토큰 동일(빈 JSX 주석 10곳만 차이). site·frontend·admin tsc, site vitest 105 passed Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
c6908629f3
commit
11d30bb3d1
479 files changed
+3337
-13091
No files matched your search
@@ -1,7 +1,4 @@
|
||||
"""OpenAI Chat Completions 호출 — services/llm/gemini.py 와 같은 자리, 다른 공급자.
|
||||
|
||||
여기가 책임지는 것: 주소·인증 헤더·재시도·구조화 출력 스키마 변환·응답 파싱·토큰 집계·비용 계산.
|
||||
여기가 책임지지 않는 것: 무엇을 물을지(services/prompts/), 답을 믿을지(services/grounding/)."""
|
||||
"""OpenAI Chat Completions 호출 — services/llm/gemini.py 와 같은 자리, 다른 공급자."""
|
||||
import asyncio
|
||||
import base64
|
||||
import json
|
||||
@@ -27,11 +24,7 @@ def is_configured() -> bool:
|
||||
|
||||
|
||||
def _to_strict_schema(schema: dict) -> dict:
|
||||
"""OpenAI strict 모드 요구사항(모든 object 에 additionalProperties:false,
|
||||
모든 property 가 required)을 만족하도록 재귀 변환한다.
|
||||
|
||||
★ Gemini용 RESPONSE_SCHEMA(OpenAPI 서브셋, services/prompts/*.py)를 그대로 받아
|
||||
변환한다 — 두 벌 관리하지 않는다."""
|
||||
"""OpenAI strict 모드 요구사항(모든 object 에 additionalProperties:false, 모든 property 가 required)을 만족하도록 재귀 변환한다."""
|
||||
schema = dict(schema)
|
||||
if schema.get("type") == "object" and "properties" in schema:
|
||||
schema["properties"] = {k: _to_strict_schema(v) for k, v in schema["properties"].items()}
|
||||
@@ -62,9 +55,6 @@ async def generate(
|
||||
temperature: float = 0.2,
|
||||
max_retries: int = 2,
|
||||
) -> LlmResult:
|
||||
# ★ 실측(2026-09-16): gpt-5.6-luna 는 temperature 커스텀 값을 거부한다
|
||||
# ("Only the default (1) value is supported" — 400). Gemini 와 달리 이 파라미터를
|
||||
# 그냥 안 보낸다 — 공급자가 강제하는 값이라 우리가 흉내 낼 방법이 없다.
|
||||
body: dict = {
|
||||
"model": model,
|
||||
"messages": _build_messages(prompt, images),
|
||||
|
||||
Reference in new issue
Block a user