File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ class ModelType(enum.Enum):
51
51
embeddings = "/v1/embeddings"
52
52
rerank = "/v1/rerank"
53
53
score = "/v1/score"
54
+ vision = "/v1/chat/completions"
54
55
55
56
@staticmethod
56
57
def get_test_payload (model_type : str ):
@@ -75,6 +76,26 @@ def get_test_payload(model_type: str):
75
76
return {"query" : "Hello" , "documents" : ["Test" ]}
76
77
case ModelType .score :
77
78
return {"encoding_format" : "float" , "text_1" : "Test" , "test_2" : "Test2" }
79
+ case ModelType .vision :
80
+ return {
81
+ "messages" : [
82
+ {
83
+ "role" : "user" ,
84
+ "content" : [
85
+ {
86
+ "type" : "text" ,
87
+ "text" : "This is a test. Just reply with yes" ,
88
+ },
89
+ {
90
+ "type" : "image_url" ,
91
+ "image_url" : {
92
+ "url" : "data:image/jpeg;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAG0lEQVR4nGLinfJq851wJn69udZSvIAAAAD//yf3BLKCfW8HAAAAAElFTkSuQmCC"
93
+ },
94
+ },
95
+ ],
96
+ }
97
+ ]
98
+ }
78
99
79
100
@staticmethod
80
101
def get_all_fields ():
You can’t perform that action at this time.
0 commit comments