Skip to content

Commit

Permalink
Remove print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
homanp committed Nov 7, 2023
1 parent edac261 commit ac1c777
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions libs/superagent/app/tools/gpt_vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class GPTVision(BaseTool):
return_direct = False

def _run(self, input: dict) -> str:
print(input)
client = OpenAI(api_key=self.metadata["openaiApiKey"])
response = client.chat.completions.create(
model="gpt-4-vision-preview",
Expand All @@ -24,14 +23,12 @@ def _run(self, input: dict) -> str:
],
}
],
max_tokens=2000,
max_tokens=300,
)
print(response)
output = response.choices[0]
return output

async def _arun(self, input: dict) -> str:
print(input)
client = AsyncOpenAI(api_key=self.metadata["openaiApiKey"])
response = await client.chat.completions.create(
model="gpt-4-vision-preview",
Expand All @@ -47,8 +44,7 @@ async def _arun(self, input: dict) -> str:
],
}
],
max_tokens=2000,
max_tokens=300,
)
print(response)
output = response.choices[0]
return output

0 comments on commit ac1c777

Please sign in to comment.