Skip to content

Commit

Permalink
Merge pull request #5 from RockChinQ/feat/show-channel-identi-in-id
Browse files Browse the repository at this point in the history
Feat: output channel identifier in resp id
  • Loading branch information
RockChinQ authored Sep 22, 2023
2 parents 52619d1 + 9bfce37 commit 26133ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion free_one_api/impls/forward/mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ async def __non_stream_query(
req: request.Request,
) -> quart.Response:
before = time.time()
id_suffix = "".join(random.choices(string.ascii_letters+string.digits, k=29))

# id_suffix: channel id(3 chars) + adapter module name(max 10 chars) + random(16 chars)
id_suffix = ""
id_suffix += "{}".format(chan.id).zfill(3)
id_suffix += chan.adapter.__class__.__name__[:10]
id_suffix += "".join(random.choices(string.ascii_letters+string.digits, k=29-len(id_suffix)))

normal_message = ""

Expand Down

0 comments on commit 26133ff

Please sign in to comment.