Skip to content

Commit

Permalink
ruff fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhe-log10 committed Feb 8, 2024
1 parent 0284fd7 commit 6a87be4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions examples/logging/steaming.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# from openai import OpenAI
from log10.load import OpenAI


client = OpenAI()

response = client.chat.completions.create(
Expand Down
8 changes: 3 additions & 5 deletions tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest
import requests_mock

from log10.load import log_sync, log_async, OpenAI, log10_session
from log10.llm import LLM, Log10Config
from log10.load import OpenAI, log10_session, log_async, log_sync


def test_log_sync_500():
Expand Down Expand Up @@ -69,10 +69,8 @@ async def test_log_async_httpx_multiple_calls_with_tags(respx_mock):

def better_logging():
uuids = [str(uuid.uuid4()) for _ in range(5)]
with log10_session(tags=uuids) as s:
completion = client.chat.completions.create(
model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Say pong"}]
)
with log10_session(tags=uuids):
client.chat.completions.create(model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Say pong"}])

loop = asyncio.get_event_loop()
await asyncio.gather(*[loop.run_in_executor(None, better_logging) for _ in range(simultaneous_calls)])

0 comments on commit 6a87be4

Please sign in to comment.