Skip to content

Commit

Permalink
feat: Use custom model for summarization
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed May 24, 2024
1 parent 88aa9b2 commit 0003f29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agents-api/agents_api/activities/summarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
)
from agents_api.common.protocol.entries import Entry
from ..model_registry import JULEP_MODELS
from ..env import model_inference_url, model_api_key
from ..env import model_inference_url, model_api_key, summarization_model_name
from agents_api.rec_sum.entities import get_entities
from agents_api.rec_sum.summarize import summarize_messages
from agents_api.rec_sum.trim import trim_messages
Expand Down Expand Up @@ -209,8 +209,8 @@ async def summarization(session_id: str) -> None:
assert len(entries) > 0, "no need to summarize on empty entries list"

trimmed_messages, entities = await asyncio.gather(
trim_messages(entries),
get_entities(entries),
trim_messages(entries, model=summarization_model_name),
get_entities(entries, model=summarization_model_name),
)
summarized = await summarize_messages(trimmed_messages)

Expand Down

0 comments on commit 0003f29

Please sign in to comment.