Skip to content

Commit

Permalink
Merge pull request #1950 from SciPhi-AI/feature/together-ai-workaround
Browse files Browse the repository at this point in the history
fix eos problem
  • Loading branch information
emrgnt-cmplxty authored Feb 9, 2025
2 parents 39c8d44 + 9e39d97 commit 60f82b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions py/core/base/providers/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ async def aget_completion_stream(
if chunk.choices[0].finish_reason != ""
else None
) # handle error output conventions
chunk.choices[0].finish_reason = (
chunk.choices[0].finish_reason
if chunk.choices[0].finish_reason != "eos"
else "stop"
) # hardcode `eos` to `stop` for consistency
try:
yield LLMChatCompletionChunk(**(chunk.dict()))
except Exception as e:
Expand Down
2 changes: 1 addition & 1 deletion py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "r2r"
readme = "README.md"
version = "3.3.40"
version = "3.3.41"

description = "SciPhi R2R"
authors = ["Owen Colegrove <[email protected]>"]
Expand Down

0 comments on commit 60f82b9

Please sign in to comment.