vllm (haechi) 추가
This commit is contained in:
1 parent
310b85bf36
commit
e32f8ef533
13 files changed
+119
-14
No files matched your search
@@ -18,8 +18,7 @@ from models.context import (
|
||||
ReasonDraft,
|
||||
render_claims,
|
||||
)
|
||||
from settings import settings
|
||||
from utils.common_llm import StructuredLLM
|
||||
from utils.common_llm import create_llm
|
||||
|
||||
CLASSIFY_PROMPT = """너는 독서토론의 최신 발화들이 어떤 주장에 해당하는지 구분한다.
|
||||
|
||||
@@ -44,7 +43,7 @@ SUMMARY_PROMPT = """너는 독서토론의 맥락을 요약한다.
|
||||
- 어떤 쟁점이 오갔고 누가 어떤 입장인지 드러나게 쓴다.
|
||||
- 신규/갱신 주장을 반영한다."""
|
||||
|
||||
context_llm = StructuredLLM(settings.llm_model, settings.chatgpt_api_key)
|
||||
context_llm = create_llm()
|
||||
|
||||
|
||||
def _render_turns(turns: list[DiscussionTurn]) -> str:
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
from models.context import DiscussionContext, render_claims
|
||||
from models.persona import PersonaInfo, PersonaInput, PersonaSummary, SpeechStrategy, TopicViewPoint
|
||||
from settings import settings
|
||||
from utils.common_llm import StructuredLLM
|
||||
from utils.common_llm import create_llm
|
||||
|
||||
INTERPRET_PROMPT = """너는 독서토론 참여자의 페르소나를 해석한다.
|
||||
키워드와 인적 정보를 바탕으로 이 사람이 어떤 사람인지, 어떻게 생각하고 말하는지를 요약한다."""
|
||||
@@ -16,7 +15,7 @@ STRATEGY_PROMPT = """너는 독서토론 참여자의 이번 발화 전략을
|
||||
공감, 반문, 정리, 새로운 시각 제시처럼 대화에 작용하는 방식을 구체적으로 쓴다.
|
||||
주장 목록에서 참여자 자신의 주장은 입장의 일관성을 지키는 데 참고한다."""
|
||||
|
||||
persona_llm = StructuredLLM(settings.llm_model, settings.chatgpt_api_key)
|
||||
persona_llm = create_llm()
|
||||
|
||||
|
||||
def _render_persona(persona_input: PersonaInput) -> str:
|
||||
|
||||
@@ -7,8 +7,7 @@ from models.persona import PersonaInfo
|
||||
from models.utterance_guide import StyleGuideResult, UtteranceGuide, UtteranceGuideInput
|
||||
from services.context_extraction import extract_context
|
||||
from services.persona_analysis import prepare_persona, select_strategy
|
||||
from settings import settings
|
||||
from utils.common_llm import StructuredLLM
|
||||
from utils.common_llm import create_llm
|
||||
|
||||
SYSTEM_PROMPT = """너는 독서토론에 참여하는 AI의 다음 발화를 설계한다.
|
||||
주어진 참여자로서 페르소나대로 토론에 참여한다고 보고, 발화문은 쓰지 말고 어떻게 발화할지만 정한다.
|
||||
@@ -19,7 +18,7 @@ SYSTEM_PROMPT = """너는 독서토론에 참여하는 AI의 다음 발화를
|
||||
- key_message: 핵심으로 전할 내용을 한 문장으로 쓴다.
|
||||
- tone: 발화 전략과 페르소나에 맞는 태도를 쓴다."""
|
||||
|
||||
guide_llm = StructuredLLM(settings.llm_model, settings.chatgpt_api_key)
|
||||
guide_llm = create_llm()
|
||||
|
||||
|
||||
def _render_input(guide_input: UtteranceGuideInput) -> str:
|
||||
|
||||
Reference in new issue
Block a user