Skip to content

Commit

Permalink
vision support
Browse files Browse the repository at this point in the history
  • Loading branch information
valaises authored and mitya52 committed Oct 17, 2024
1 parent 5411936 commit ef29a37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions refact_webgui/webgui/selfhost_fastapi_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class NlpCompletion(NlpSamplingParams):

class ChatMessage(BaseModel):
role: str
content: str
content: Union[str, List[Dict]]
# TODO: validate using pydantic
tool_calls: Optional[List[Dict[str, Any]]] = None
tool_call_id: Optional[str] = None
Expand Down Expand Up @@ -520,7 +520,7 @@ async def litellm_streamer():
max_tokens=min(model_dict.get('T_out', post.max_tokens), post.max_tokens),
tools=post.tools,
tool_choice=post.tool_choice,
stop=post.stop,
stop=post.stop if post.stop else None,
n=post.n,
)
finish_reason = None
Expand Down Expand Up @@ -559,7 +559,7 @@ async def litellm_non_streamer():
max_tokens=min(model_dict.get('T_out', post.max_tokens), post.max_tokens),
tools=post.tools,
tool_choice=post.tool_choice,
stop=post.stop,
stop=post.stop if post.stop else None,
n=post.n,
)
finish_reason = None
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class PyPackage:
"refact_webgui": PyPackage(
requires=["aiohttp", "aiofiles", "cryptography", "fastapi==0.100.0", "giturlparse", "pydantic>=2",
"starlette==0.27.0", "uvicorn", "uvloop", "termcolor", "python-multipart", "more_itertools",
"scyllapy==1.3.0", "pandas>=2.0.3", "litellm>=1.44.24"],
"scyllapy==1.3.0", "pandas>=2.0.3", "litellm>=1.49.5"],
requires_packages=["refact_known_models", "refact_utils"],
data=["webgui/static/*", "webgui/static/components/modals/*",
"webgui/static/dashboards/*", "webgui/static/assets/*", "webgui/static/utils/*",]),
Expand Down

0 comments on commit ef29a37

Please sign in to comment.