Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

context_management=[{"type": "type"}] in tests, not 'compaction'

クローズ 初心者向け
#2,868 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
api

調査の方向性

まず src/openai/types/responses/response_create_params.py と tests/api_resources/test_responses.py の context_management の例を調べます。宣言されているサポート対象のエントリ型とテストで使用されている値を比較し、そのテストファイルを実行します。テストがサポート対象のコンテキスト管理値を使用してパスすれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
Confirm this is an issue with the Python library and not an underlying OpenAI API
  • This is an issue with the Python library
Describe the bug

src/openai/types/responses/response_create_params.py gives us the supported string:

"""The context management entry type. Currently only 'compaction' is supported."""

It is sufficent to say that tests/api_resources/test_responses.py would fail without the right value for that key, or that the API actually able to run that test is not validating the one enum that would make something happen.

To Reproduce
  1. look at the code
  2. be astonished.
Code snippets
response = client.responses.create(
            background=True,
            context_management=[
                {
                    "type": "type",  # wot?
                    "compact_threshold": 1000,
                }
            ],
OS

AnyOS

Python version

Python 3.12

Library version

v2.20.0

主要言語
Python
スター
31.8k
フォーク
7.3k
平均マージ
1日 1時間
マージ済み PR(30日)
137

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openai/openai-python のほかの issue

openai/openai-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。