Skip to content

Commit ef29a37

Browse files
valaisesmitya52
authored andcommitted
vision support
1 parent 5411936 commit ef29a37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

refact_webgui/webgui/selfhost_fastapi_completions.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class NlpCompletion(NlpSamplingParams):
7171

7272
class ChatMessage(BaseModel):
7373
role: str
74-
content: str
74+
content: Union[str, List[Dict]]
7575
# TODO: validate using pydantic
7676
tool_calls: Optional[List[Dict[str, Any]]] = None
7777
tool_call_id: Optional[str] = None
@@ -520,7 +520,7 @@ async def litellm_streamer():
520520
max_tokens=min(model_dict.get('T_out', post.max_tokens), post.max_tokens),
521521
tools=post.tools,
522522
tool_choice=post.tool_choice,
523-
stop=post.stop,
523+
stop=post.stop if post.stop else None,
524524
n=post.n,
525525
)
526526
finish_reason = None
@@ -559,7 +559,7 @@ async def litellm_non_streamer():
559559
max_tokens=min(model_dict.get('T_out', post.max_tokens), post.max_tokens),
560560
tools=post.tools,
561561
tool_choice=post.tool_choice,
562-
stop=post.stop,
562+
stop=post.stop if post.stop else None,
563563
n=post.n,
564564
)
565565
finish_reason = None

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class PyPackage:
3535
"refact_webgui": PyPackage(
3636
requires=["aiohttp", "aiofiles", "cryptography", "fastapi==0.100.0", "giturlparse", "pydantic>=2",
3737
"starlette==0.27.0", "uvicorn", "uvloop", "termcolor", "python-multipart", "more_itertools",
38-
"scyllapy==1.3.0", "pandas>=2.0.3", "litellm>=1.44.24"],
38+
"scyllapy==1.3.0", "pandas>=2.0.3", "litellm>=1.49.5"],
3939
requires_packages=["refact_known_models", "refact_utils"],
4040
data=["webgui/static/*", "webgui/static/components/modals/*",
4141
"webgui/static/dashboards/*", "webgui/static/assets/*", "webgui/static/utils/*",]),

0 commit comments

Comments
 (0)