File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
llm-service/app/tests/model_provider_mocks Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -156,17 +156,12 @@ def mock_make_api_call(
156156 ],
157157 }
158158 elif operation_name == "InvokeModel" :
159- texts : list [str ] = json .loads (api_params ["body" ])["inputText" ]
160159 return {
161- "contentType" : "application/json" ,
162- # TODO: does this need to be botocore.response.StreamingBody?
163160 "body" : io .BytesIO (
164161 json .dumps (
165162 {
166- "texts" : texts ,
167- "embeddings" : [
168- [random .gauss (mu = 0.0 , sigma = 0.1 ) for _ in range (16 )]
169- for _ in texts
163+ "embedding" : [
164+ random .gauss (mu = 0.0 , sigma = 0.1 ) for _ in range (16 )
170165 ],
171166 }
172167 ).encode ()
@@ -237,9 +232,9 @@ def test_bedrock_models(client: TestClient) -> None:
237232 assert [
238233 model ["model_id" ] for model in response .json ()
239234 ] == available_embedding_models
240- # for model_id in available_embedding_models:
241- # response = client.get(f"/llm-service/models/embedding/{model_id}/test")
242- # assert response.status_code == 200 # TODO
235+ for model_id in available_embedding_models :
236+ response = client .get (f"/llm-service/models/embedding/{ model_id } /test" )
237+ assert response .status_code == 200 # TODO
243238
244239 available_text_models = [
245240 model_id
You can’t perform that action at this time.
0 commit comments