Skip to content

Commit

Permalink
Fix httpx proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
ionic-bond committed Dec 11, 2024
1 parent 2e4d31f commit 20b6748
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stream_translator_gpt/llm_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def _append_history_message(self, user_content: str, assistant_content: str):

def _translate_by_gpt(self, translation_task: TranslationTask):
# https://platform.openai.com/docs/api-reference/chat/create?lang=python
client = OpenAI(http_client=DefaultHttpxClient(proxies=self.proxy))
client = OpenAI(http_client=DefaultHttpxClient(proxy=self.proxy))
system_prompt = 'You are a translation engine.'
if self.use_json_result:
system_prompt += " Output the answer in json format, key is translation."
Expand Down

0 comments on commit 20b6748

Please sign in to comment.