Skip to content

Commit

Permalink
Remove unused function parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Jun 28, 2023
1 parent 7a1d3f7 commit 9e81337
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ async def code_to_text(
continue

tasks.append(
asyncio.create_task(
self.generate_text(path, prompt_code, "file", self.tokens)
)
asyncio.create_task(self.generate_text(path, prompt_code, self.tokens))
)
results = await asyncio.gather(*tasks, return_exceptions=True)

Expand Down Expand Up @@ -121,9 +119,7 @@ async def chat_to_text(self, prompts: List[str]) -> List[str]:
for idx, prompt in enumerate(prompts):
tokens = utils.adjust_max_tokens(self.tokens, prompt)
tasks.append(
asyncio.create_task(
self.generate_text(idx + 1, prompt, "prompt", tokens)
)
asyncio.create_task(self.generate_text(idx + 1, prompt, tokens))
)

results = []
Expand All @@ -148,7 +144,7 @@ async def chat_to_text(self, prompts: List[str]) -> List[str]:
),
)
async def generate_text(
self, index: str, prompt: str, type: str, tokens: int
self, index: str, prompt: str, tokens: int
) -> Tuple[str, str]:
"""Handles the request to the OpenAI API to generate text.
Expand Down

0 comments on commit 9e81337

Please sign in to comment.