Remove request wrapper migration (#64)

* [1/n] migrate inference/chat_completion

* migrate inference/completion

* inference/completion

* inference regenerate openapi spec

* safety api

* migrate agentic system

* migrate apis without implementations

* re-generate openapi spec

* remove hack from openapi generator

* fix inference

* fix inference

* openapi generator rerun

* Simplified Telemetry API and tying it to logger (#57)

* Simplified Telemetry API and tying it to logger

* small update which adds a METRIC type

* move span events one level down into structured log events

---------

Co-authored-by: Ashwin Bharambe <ashwin@meta.com>

* fix api to work with openapi generator

* fix agentic calling inference

* together adapter inference

* update inference adapters

---------

Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
Co-authored-by: Ashwin Bharambe <ashwin@meta.com>
This commit is contained in:
Xi Yan 2024-09-12 15:03:49 -07:00 committed by GitHub
parent 1d0e91d802
commit 5712566061
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 1211 additions and 3031 deletions

View file

@ -249,7 +249,12 @@ class InferenceTests(unittest.IsolatedAsyncioTestCase):
stream=True,
tools=[ToolDefinition(tool_name=BuiltinTool.brave_search)],
)
iterator = self.api.chat_completion(request)
iterator = self.api.chat_completion(
request.model,
request.messages,
stream=request.stream,
tools=request.tools,
)
events = []
async for chunk in iterator:

View file

@ -61,7 +61,9 @@ class OllamaInferenceTests(unittest.IsolatedAsyncioTestCase):
],
stream=False,
)
iterator = self.api.chat_completion(request)
iterator = self.api.chat_completion(
request.model, request.messages, stream=request.stream
)
async for r in iterator:
response = r
print(response.completion_message.content)