Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[generative_ai]: Function calling with OpenAI samples are not working anymore.

未關閉
#12,996 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

這個 Issue 還沒有評估資料。

描述

priority: p2 samples triage me type: bug

In which file did you encounter the issue?

generative_ai/function_calling/test_function_calling.py

Did you change the file? If so, how?

No.

Describe the issue

Both function calling with Open AI samples (1, 2) are no longer working (CI build log):

  File "/workspace/generative_ai/function_calling/test_function_calling.py", line 59, in test_function_calling_basic
    response = chat_function_calling_basic.generate_text()
  File "/workspace/generative_ai/function_calling/chat_function_calling_basic.py", line 39, in generate_text
    client = openai.OpenAI(
  File "/workspace/generative_ai/function_calling/.nox/py-3-9/lib/python3.9/site-packages/openai/_client.py", line 122, in __init__
    super().__init__(
  File "/workspace/generative_ai/function_calling/.nox/py-3-9/lib/python3.9/site-packages/openai/_base_client.py", line 825, in __init__
    self._client = http_client or SyncHttpxClientWrapper(
  File "/workspace/generative_ai/function_calling/.nox/py-3-9/lib/python3.9/site-packages/openai/_base_client.py", line 723, in __init__
    super().__init__(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'proxies'

- generated xml file: /workspace/generative_ai/function_calling/sponge_log.xml -
=========================== short test summary info ============================
FAILED test_function_calling.py::test_function_calling_basic - TypeError: __i...
FAILED test_function_calling.py::test_function_calling_config - TypeError: __...
========================= 2 failed, 5 passed in 14.85s =========================

I noticed this issue when worked on https://github.com/GoogleCloudPlatform/python-docs-samples/pull/12811
There is a related discussion https://github.com/GoogleCloudPlatform/python-docs-samples/issues/12990 about missing regressions after the recent CI migration.

主要語言
Jupyter Notebook
星號
8.1k
分支
6.7k
平均合併
4 天 4 小時
30 天內合併 PR
8

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

GoogleCloudPlatform/python-docs-samples 的其他 Issue

查看 GoogleCloudPlatform/python-docs-samples 的全部 Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。