mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
vision is now working in ollama owui
This commit is contained in:
parent
6039791adf
commit
72d467c6d5
1 changed files with 6 additions and 1 deletions
|
@ -2262,6 +2262,11 @@ ws ::= | " " | "\n" [ \t]{0,20}
|
|||
|
||||
# content can be a string or an array of objects
|
||||
curr_content = message.get("content",None)
|
||||
if api_format==7: #ollama handle vision
|
||||
imgs = message.get("images",None)
|
||||
if imgs and len(imgs) > 0:
|
||||
for img in imgs:
|
||||
images_added.append(img)
|
||||
if not curr_content:
|
||||
pass # do nothing
|
||||
elif isinstance(curr_content, str):
|
||||
|
@ -3127,7 +3132,7 @@ Change Mode<br>
|
|||
response_body = (json.dumps({"temperature":0.75,"speed":1,"length_penalty":1,"repetition_penalty":1,"top_p":1,"top_k":4,"enable_text_splitting":True,"stream_chunk_size":100}).encode()) #some random voices for them to enjoy
|
||||
|
||||
elif self.path.endswith('/api/tags') or self.path.endswith('/api/ps'): #ollama compatible
|
||||
response_body = (json.dumps({"models":[{"name":"koboldcpp","model":friendlymodelname,"modified_at":"2024-07-19T15:26:55.6122841+08:00","expires_at": "2055-06-04T19:06:25.5433636+08:00","size":394998579,"size_vram":394998579,"digest":"b5dc5e784f2a3ee1582373093acf69a2f4e2ac1710b253a001712b86a61f88bb","details":{"parent_model":"","format":"gguf","family":"koboldcpp","families":["koboldcpp"],"parameter_size":"128M","quantization_level":"Q4_0"}}]}).encode())
|
||||
response_body = (json.dumps({"models":[{"name":"koboldcpp","model":f"{friendlymodelname}:latest","modified_at":"2024-07-19T15:26:55.6122841+08:00","expires_at": "2055-06-04T19:06:25.5433636+08:00","size":394998579,"size_vram":394998579,"digest":"b5dc5e784f2a3ee1582373093acf69a2f4e2ac1710b253a001712b86a61f88bb","details":{"parent_model":"","format":"gguf","family":"koboldcpp","families":["koboldcpp"],"parameter_size":"128M","quantization_level":"Q4_0"}},{"name":"koboldcpp","model":friendlymodelname,"modified_at":"2024-07-19T15:26:55.6122841+08:00","expires_at": "2055-06-04T19:06:25.5433636+08:00","size":394998579,"size_vram":394998579,"digest":"b5dc5e784f2a3ee1582373093acf69a2f4e2ac1710b253a001712b86a61f88bb","details":{"parent_model":"","format":"gguf","family":"koboldcpp","families":["koboldcpp"],"parameter_size":"128M","quantization_level":"Q4_0"}}]}).encode())
|
||||
elif self.path.endswith('/api/version'): #ollama compatible, NOT the kcpp version
|
||||
response_body = (json.dumps({"version":"0.7.0"}).encode())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue