Skip to content

Commit

Permalink
feat: use uuid for vLLM request generation
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Dec 28, 2024
1 parent 445b66b commit 4b5826c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion runner/app/pipelines/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import os
import time
import uuid
from dataclasses import dataclass
from typing import Dict, Any, List, AsyncGenerator, Union, Optional

Expand Down Expand Up @@ -195,7 +196,7 @@ async def generate(
frequency_penalty=config.frequency_penalty,
)

request_id = f"chatcmpl-{int(time.time())}"
request_id = f"chatcmpl-{uuid.uuid4()}"

results_generator = self.engine.generate(
prompt=full_prompt, sampling_params=sampling_params, request_id=request_id)
Expand Down

0 comments on commit 4b5826c

Please sign in to comment.