mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-24 17:04:55 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
722385e715
commit
9bef7a1b46
1 changed files with 5 additions and 1 deletions
|
|
@ -165,6 +165,7 @@ class ScoredData(BaseModel):
|
|||
|
||||
return v
|
||||
|
||||
|
||||
def _scored_data_to_dict(scored_data: ScoredData) -> Dict[str, Any]:
|
||||
"""Convert a `ScoredData` pydantic model into a plain dictionary."""
|
||||
|
||||
|
|
@ -217,13 +218,16 @@ def _process_scored_data(scored_data: ScoredData) -> Dict[str, Any]:
|
|||
|
||||
return {
|
||||
"status": "buffered",
|
||||
"buffer_size": sum(len(group["tokens"]) for group in app.state.buffer.get(env_id, [])),
|
||||
"buffer_size": sum(
|
||||
len(group["tokens"]) for group in app.state.buffer.get(env_id, [])
|
||||
),
|
||||
}
|
||||
|
||||
app.state.queue.append(data_dict)
|
||||
app.state.latest = data_dict
|
||||
return {"status": "received"}
|
||||
|
||||
|
||||
class Status(BaseModel):
|
||||
"""
|
||||
basemodel for status information of the current server
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue