Skip to content

Commit db2cc99

Browse files
Removing unused code
1 parent 83e34f6 commit db2cc99

File tree

2 files changed

+0
-110
lines changed

2 files changed

+0
-110
lines changed

ads/aqua/modeldeployment/deployment.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,25 +1316,6 @@ def list_shapes(self, **kwargs) -> List[ComputeShapeSummary]:
13161316
for oci_shape in oci_shapes
13171317
]
13181318

1319-
@staticmethod
1320-
def _stream_sanitizer(response):
1321-
for chunk in response.data.raw.stream(1024 * 1024, decode_content=True):
1322-
if not chunk:
1323-
continue
1324-
1325-
try:
1326-
decoded = chunk.decode("utf-8").strip()
1327-
if not decoded.startswith("data:"):
1328-
continue
1329-
1330-
data_json = decoded[len("data:") :].strip()
1331-
parsed = json.loads(data_json)
1332-
text = parsed["choices"][0]["text"]
1333-
yield text
1334-
1335-
except Exception:
1336-
continue
1337-
13381319
@telemetry(entry_point="plugin=inference&action=get_response", name="aqua")
13391320
def get_model_deployment_response(
13401321
self, model_deployment_id: str, payload: dict, route_override_header: str

ads/aqua/modeldeployment/inference.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)