Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
fix pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
patcher9 committed Mar 16, 2024
1 parent 0915604 commit 22461e8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/dokumetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DokuConfig:
application_name = None
skip_resp = None

# pylint: disable=too-many-arguments, line-too-long
# pylint: disable=too-many-arguments, line-too-long, too-many-return-statements
def init(llm, doku_url, api_key, environment="default", application_name="default", skip_resp=False):
"""
Initialize Doku configuration based on the provided function.
Expand Down Expand Up @@ -58,6 +58,7 @@ def init(llm, doku_url, api_key, environment="default", application_name="defaul
elif isinstance(llm, AsyncOpenAI):
init_async_openai(llm, doku_url, api_key, environment, application_name, skip_resp)
return
# pylint: disable=no-else-return, line-too-long
if hasattr(llm, 'moderations') and callable(llm.chat.completions.create) and ('.openai.azure.com/' in str(llm.base_url)):
if isinstance(llm, AzureOpenAI):
init_azure_openai(llm, doku_url, api_key, environment, application_name, skip_resp)
Expand Down
2 changes: 1 addition & 1 deletion src/dokumetry/async_azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def stream_generator():
send_data(data, doku_url, api_key)

return response

async def llm_completions(*args, **kwargs):
"""
Patched version of OpenAI's completions create method.
Expand Down
2 changes: 1 addition & 1 deletion src/dokumetry/azure_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def stream_generator():
send_data(data, doku_url, api_key)

return response

def llm_completions(*args, **kwargs):
"""
Patched version of Azure OpenAI's completions create method.
Expand Down

0 comments on commit 22461e8

Please sign in to comment.