scale-gp-beta 0.1.0a29__tar.gz → 0.1.0a30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/.gitignore +0 -1
  2. scale_gp_beta-0.1.0a30/.release-please-manifest.json +3 -0
  3. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/CHANGELOG.md +44 -0
  4. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/PKG-INFO +2 -3
  5. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/README.md +1 -2
  6. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/api.md +18 -0
  7. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/pyproject.toml +2 -2
  8. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_base_client.py +4 -1
  9. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_client.py +9 -0
  10. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_files.py +4 -4
  11. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_models.py +24 -3
  12. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_version.py +1 -1
  13. scale_gp_beta-0.1.0a30/src/scale_gp_beta/lib/CONTRIBUTING.MD +53 -0
  14. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/trace_queue_manager.py +14 -0
  15. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/__init__.py +14 -0
  16. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/chat/completions.py +4 -0
  17. scale_gp_beta-0.1.0a30/src/scale_gp_beta/resources/responses.py +314 -0
  18. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/spans.py +14 -22
  19. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/__init__.py +17 -0
  20. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/chat_completion.py +61 -6
  21. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/chat_completion_chunk.py +17 -1
  22. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/completion_models_params.py +2 -0
  23. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/model_definition.py +6 -0
  24. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/completion.py +8 -0
  25. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/container.py +0 -6
  26. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset.py +3 -1
  27. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item.py +3 -1
  28. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation.py +3 -7
  29. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_item.py +3 -1
  30. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_task.py +31 -55
  31. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_task_param.py +28 -1
  32. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/file.py +3 -1
  33. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/inference_model.py +3 -0
  34. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/question.py +11 -10
  35. scale_gp_beta-0.1.0a30/src/scale_gp_beta/types/response.py +2852 -0
  36. scale_gp_beta-0.1.0a30/src/scale_gp_beta/types/response_create_params.py +817 -0
  37. scale_gp_beta-0.1.0a30/src/scale_gp_beta/types/response_create_response.py +20891 -0
  38. scale_gp_beta-0.1.0a30/src/scale_gp_beta/types/shared/__init__.py +3 -0
  39. scale_gp_beta-0.1.0a30/src/scale_gp_beta/types/shared/identity.py +16 -0
  40. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span.py +4 -2
  41. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_search_params.py +4 -7
  42. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/chat/test_completions.py +2 -0
  43. scale_gp_beta-0.1.0a30/tests/api_resources/test_responses.py +138 -0
  44. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_spans.py +4 -6
  45. scale_gp_beta-0.1.0a30/tests/lib/tracing/test_trace_queue_manager.py +80 -0
  46. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_models.py +28 -1
  47. scale_gp_beta-0.1.0a29/.release-please-manifest.json +0 -3
  48. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/CONTRIBUTING.md +0 -0
  49. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/LICENSE +0 -0
  50. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/SECURITY.md +0 -0
  51. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/bin/check-release-environment +0 -0
  52. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/bin/publish-pypi +0 -0
  53. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/examples/.keep +0 -0
  54. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/examples/tracing/0_primitives_fibonacci.py +0 -0
  55. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/examples/tracing/1_explicit_use_case.py +0 -0
  56. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/examples/tracing/2_direct_upload.py +0 -0
  57. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/examples/tracing/3_openai_agent_tracing.py +0 -0
  58. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/mypy.ini +0 -0
  59. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/noxfile.py +0 -0
  60. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/release-please-config.json +0 -0
  61. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/requirements-dev.lock +0 -0
  62. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/requirements.lock +0 -0
  63. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp/lib/.keep +0 -0
  64. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/__init__.py +0 -0
  65. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_compat.py +0 -0
  66. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_constants.py +0 -0
  67. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_exceptions.py +0 -0
  68. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_qs.py +0 -0
  69. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_resource.py +0 -0
  70. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_response.py +0 -0
  71. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_streaming.py +0 -0
  72. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_types.py +0 -0
  73. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/__init__.py +0 -0
  74. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_logs.py +0 -0
  75. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_proxy.py +0 -0
  76. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_reflection.py +0 -0
  77. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_resources_proxy.py +0 -0
  78. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_streams.py +0 -0
  79. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_sync.py +0 -0
  80. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_transform.py +0 -0
  81. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_typing.py +0 -0
  82. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/_utils/_utils.py +0 -0
  83. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/.keep +0 -0
  84. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/__init__.py +0 -0
  85. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/exceptions.py +0 -0
  86. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/integrations/__init__.py +0 -0
  87. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/integrations/openai/__init__.py +0 -0
  88. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/integrations/openai/openai_span_type_map.py +0 -0
  89. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/integrations/openai/openai_tracing_sgp_processor.py +0 -0
  90. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/integrations/openai/utils.py +0 -0
  91. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/scope.py +0 -0
  92. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/span.py +0 -0
  93. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/trace.py +0 -0
  94. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/trace_exporter.py +0 -0
  95. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/tracing.py +0 -0
  96. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/types.py +0 -0
  97. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/lib/tracing/util.py +0 -0
  98. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/pagination.py +0 -0
  99. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/py.typed +0 -0
  100. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/chat/__init__.py +0 -0
  101. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/chat/chat.py +0 -0
  102. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/completions.py +0 -0
  103. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/dataset_items.py +0 -0
  104. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/datasets.py +0 -0
  105. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/evaluation_items.py +0 -0
  106. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/evaluations.py +0 -0
  107. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/files/__init__.py +0 -0
  108. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/files/content.py +0 -0
  109. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/files/files.py +0 -0
  110. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/inference.py +0 -0
  111. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/models.py +0 -0
  112. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/resources/questions.py +0 -0
  113. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/__init__.py +0 -0
  114. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/completion_create_params.py +0 -0
  115. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/completion_create_response.py +0 -0
  116. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/chat/completion_models_response.py +0 -0
  117. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/completion_create_params.py +0 -0
  118. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/component.py +0 -0
  119. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/component_param.py +0 -0
  120. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/container_param.py +0 -0
  121. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_create_params.py +0 -0
  122. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_delete_response.py +0 -0
  123. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item_batch_create_params.py +0 -0
  124. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item_batch_create_response.py +0 -0
  125. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item_delete_response.py +0 -0
  126. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item_list_params.py +0 -0
  127. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item_retrieve_params.py +0 -0
  128. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_item_update_params.py +0 -0
  129. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_list_params.py +0 -0
  130. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_retrieve_params.py +0 -0
  131. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/dataset_update_params.py +0 -0
  132. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_create_params.py +0 -0
  133. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_delete_response.py +0 -0
  134. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_item_list_params.py +0 -0
  135. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_item_retrieve_params.py +0 -0
  136. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_list_params.py +0 -0
  137. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_retrieve_params.py +0 -0
  138. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/evaluation_update_params.py +0 -0
  139. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/file_create_params.py +0 -0
  140. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/file_delete_response.py +0 -0
  141. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/file_list.py +0 -0
  142. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/file_list_params.py +0 -0
  143. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/file_update_params.py +0 -0
  144. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/files/__init__.py +0 -0
  145. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/inference_create_params.py +0 -0
  146. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/inference_create_response.py +0 -0
  147. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/inference_model_list.py +0 -0
  148. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/inference_response.py +0 -0
  149. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/inference_response_chunk.py +0 -0
  150. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/item_locator.py +0 -0
  151. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/item_locator_template.py +0 -0
  152. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/model_create_params.py +0 -0
  153. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/model_delete_response.py +0 -0
  154. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/model_list_params.py +0 -0
  155. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/model_update_params.py +0 -0
  156. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/question_create_params.py +0 -0
  157. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/question_list.py +0 -0
  158. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/question_list_params.py +0 -0
  159. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_batch_params.py +0 -0
  160. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_batch_response.py +0 -0
  161. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_create_params.py +0 -0
  162. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_status.py +0 -0
  163. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_type.py +0 -0
  164. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_update_params.py +0 -0
  165. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_upsert_batch_params.py +0 -0
  166. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/scale_gp_beta/types/span_upsert_batch_response.py +0 -0
  167. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/src/sgp_dev/lib/.keep +0 -0
  168. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/__init__.py +0 -0
  169. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/__init__.py +0 -0
  170. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/chat/__init__.py +0 -0
  171. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/files/__init__.py +0 -0
  172. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/files/test_content.py +0 -0
  173. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_completions.py +0 -0
  174. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_dataset_items.py +0 -0
  175. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_datasets.py +0 -0
  176. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_evaluation_items.py +0 -0
  177. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_evaluations.py +0 -0
  178. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_files.py +0 -0
  179. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_inference.py +0 -0
  180. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_models.py +0 -0
  181. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/api_resources/test_questions.py +0 -0
  182. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/conftest.py +0 -0
  183. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/lib/tracing/test_span.py +0 -0
  184. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/lib/tracing/test_trace.py +0 -0
  185. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/lib/tracing/test_trace_exporter.py +0 -0
  186. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/lib/tracing/test_tracing.py +0 -0
  187. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/sample_file.txt +0 -0
  188. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_client.py +0 -0
  189. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_deepcopy.py +0 -0
  190. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_extract_files.py +0 -0
  191. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_files.py +0 -0
  192. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_qs.py +0 -0
  193. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_required_args.py +0 -0
  194. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_response.py +0 -0
  195. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_streaming.py +0 -0
  196. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_transform.py +0 -0
  197. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_utils/test_proxy.py +0 -0
  198. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/test_utils/test_typing.py +0 -0
  199. {scale_gp_beta-0.1.0a29 → scale_gp_beta-0.1.0a30}/tests/utils.py +0 -0
@@ -1,5 +1,4 @@
1
1
  .prism.log
2
- .vscode
3
2
  _dev
4
3
 
5
4
  __pycache__
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.30"
3
+ }
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.30 (2025-08-26)
4
+
5
+ Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/scaleapi/sgp-python-beta/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([cb4c1c5](https://github.com/scaleapi/sgp-python-beta/commit/cb4c1c5edb6a15c7e3e998d54c83604f9c6bb3a1))
10
+ * **api:** api update ([32e9415](https://github.com/scaleapi/sgp-python-beta/commit/32e9415aa3fc23ebdae39d438cabf8c6a2496b49))
11
+ * **api:** api update ([8146bf3](https://github.com/scaleapi/sgp-python-beta/commit/8146bf3e9e9c65defb95d3a80525538cb05fa825))
12
+ * **api:** api update ([b112792](https://github.com/scaleapi/sgp-python-beta/commit/b1127924897e97dbf82f342b53f926407cf84591))
13
+ * **api:** api update ([674f2b1](https://github.com/scaleapi/sgp-python-beta/commit/674f2b1c7289ebf7ca41be8b91913df2da04835e))
14
+ * **api:** api update ([48c91fa](https://github.com/scaleapi/sgp-python-beta/commit/48c91fa1edf4b05196ad396e092d26e102a31ae2))
15
+ * **api:** api update ([680a7f9](https://github.com/scaleapi/sgp-python-beta/commit/680a7f9fff37bed71a05bed10928ef0ceae19079))
16
+ * **api:** api update ([d44ffe4](https://github.com/scaleapi/sgp-python-beta/commit/d44ffe4df3e02a55abb1d73abca68e2978a95f07))
17
+ * **api:** api update ([8ce7997](https://github.com/scaleapi/sgp-python-beta/commit/8ce79973d97ec3f4e362301979fd055a4021e046))
18
+ * **api:** api update ([fddd794](https://github.com/scaleapi/sgp-python-beta/commit/fddd7945fa11de496a252c30f950e717dbde2a71))
19
+ * **api:** api update ([491142b](https://github.com/scaleapi/sgp-python-beta/commit/491142b453f9f37b0907982e2a35819b05c79aba))
20
+ * **api:** api update ([4a8519e](https://github.com/scaleapi/sgp-python-beta/commit/4a8519eacadbdf4e7e5094b61671ec5282330772))
21
+ * **api:** api update ([c8bf560](https://github.com/scaleapi/sgp-python-beta/commit/c8bf5604617ddf3b23e35d3fa63f8992e27cc677))
22
+ * **api:** manual updates ([b86c069](https://github.com/scaleapi/sgp-python-beta/commit/b86c0694240b1d7c1925d1ec7ef48a230939a795))
23
+ * **api:** manual updates ([8efcc54](https://github.com/scaleapi/sgp-python-beta/commit/8efcc5412b8f912c8b7fc94eaf72ee6f2de8f9e3))
24
+ * **api:** manual updates ([d8144e7](https://github.com/scaleapi/sgp-python-beta/commit/d8144e7b869b9ccb10e1c23997d3e28bddc5d5df))
25
+ * clean up environment call outs ([8aa4d07](https://github.com/scaleapi/sgp-python-beta/commit/8aa4d075fcebffcf02fc539525c6af434291e823))
26
+ * **client:** support file upload requests ([76d95ab](https://github.com/scaleapi/sgp-python-beta/commit/76d95abb89870b14e6303de8ef52e764bbe4403a))
27
+ * SGP client hooks ([#128](https://github.com/scaleapi/sgp-python-beta/issues/128)) ([f247adb](https://github.com/scaleapi/sgp-python-beta/commit/f247adb2273f081c2d2083cc256e43c08b83c21a))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **parsing:** ignore empty metadata ([a1190e2](https://github.com/scaleapi/sgp-python-beta/commit/a1190e280c32aaac4faad6d496e012eedfeb9490))
33
+ * **parsing:** parse extra field types ([6b64a45](https://github.com/scaleapi/sgp-python-beta/commit/6b64a450d2a0b70ea857b58ccbc3540f1ad7713b))
34
+
35
+
36
+ ### Chores
37
+
38
+ * Added CONTRIBUTING.MD for lib ([#127](https://github.com/scaleapi/sgp-python-beta/issues/127)) ([2b1bda7](https://github.com/scaleapi/sgp-python-beta/commit/2b1bda7ab925c4c8c44976f72f9f5723a9e61f30))
39
+ * **internal:** change ci workflow machines ([d7ace41](https://github.com/scaleapi/sgp-python-beta/commit/d7ace4109f8a7f2a98dd8f2cc526fee2b40f85b5))
40
+ * **internal:** fix ruff target version ([057e041](https://github.com/scaleapi/sgp-python-beta/commit/057e041dc7ec6638e68ba66868bbd851aeaba3b8))
41
+ * **internal:** update comment in script ([4760add](https://github.com/scaleapi/sgp-python-beta/commit/4760add2d22f15b47d5d8b4153dc7744523a0c63))
42
+ * **project:** add settings file for vscode ([ae9740b](https://github.com/scaleapi/sgp-python-beta/commit/ae9740bd28d7aaa21a089cd328554caea643a538))
43
+ * **types:** rebuild Pydantic models after all types are defined ([a1d6eec](https://github.com/scaleapi/sgp-python-beta/commit/a1d6eece8eaae0e783eda5aad65dceb62249cdad))
44
+ * update @stainless-api/prism-cli to v5.15.0 ([a15a320](https://github.com/scaleapi/sgp-python-beta/commit/a15a320bf13cdc88ffc312253655ad97dfa517a9))
45
+ * update github action ([f78e671](https://github.com/scaleapi/sgp-python-beta/commit/f78e67191edd058555d76a45f5b08d4bf974a2c4))
46
+
3
47
  ## 0.1.0-alpha.29 (2025-07-14)
4
48
 
5
49
  Full Changelog: [v0.1.0-alpha.28...v0.1.0-alpha.29](https://github.com/scaleapi/sgp-python-beta/compare/v0.1.0-alpha.28...v0.1.0-alpha.29)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: scale-gp-beta
3
- Version: 0.1.0a29
3
+ Version: 0.1.0a30
4
4
  Summary: The official Python library for the Scale GP API
5
5
  Project-URL: Homepage, https://github.com/scaleapi/sgp-python-beta
6
6
  Project-URL: Repository, https://github.com/scaleapi/sgp-python-beta
@@ -364,7 +364,6 @@ pip install --pre scale-gp-beta[aiohttp]
364
364
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
365
365
 
366
366
  ```python
367
- import os
368
367
  import asyncio
369
368
  from scale_gp_beta import DefaultAioHttpClient
370
369
  from scale_gp_beta import AsyncSGPClient
@@ -373,7 +372,7 @@ from scale_gp_beta import AsyncSGPClient
373
372
  async def main() -> None:
374
373
  async with AsyncSGPClient(
375
374
  account_id="My Account ID",
376
- api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
375
+ api_key="My API Key",
377
376
  http_client=DefaultAioHttpClient(),
378
377
  ) as client:
379
378
  completion = await client.chat.completions.create(
@@ -329,7 +329,6 @@ pip install --pre scale-gp-beta[aiohttp]
329
329
  Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
330
330
 
331
331
  ```python
332
- import os
333
332
  import asyncio
334
333
  from scale_gp_beta import DefaultAioHttpClient
335
334
  from scale_gp_beta import AsyncSGPClient
@@ -338,7 +337,7 @@ from scale_gp_beta import AsyncSGPClient
338
337
  async def main() -> None:
339
338
  async with AsyncSGPClient(
340
339
  account_id="My Account ID",
341
- api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
340
+ api_key="My API Key",
342
341
  http_client=DefaultAioHttpClient(),
343
342
  ) as client:
344
343
  completion = await client.chat.completions.create(
@@ -1,3 +1,21 @@
1
+ # Shared Types
2
+
3
+ ```python
4
+ from scale_gp_beta.types import Identity
5
+ ```
6
+
7
+ # Responses
8
+
9
+ Types:
10
+
11
+ ```python
12
+ from scale_gp_beta.types import Response, ResponseCreateResponse
13
+ ```
14
+
15
+ Methods:
16
+
17
+ - <code title="post /v5/responses">client.responses.<a href="./src/scale_gp_beta/resources/responses.py">create</a>(\*\*<a href="src/scale_gp_beta/types/response_create_params.py">params</a>) -> <a href="./src/scale_gp_beta/types/response_create_response.py">ResponseCreateResponse</a></code>
18
+
1
19
  # Completions
2
20
 
3
21
  Types:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "scale-gp-beta"
3
- version = "0.1.0-alpha.29"
3
+ version = "0.1.0-alpha.30"
4
4
  description = "The official Python library for the Scale GP API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -159,7 +159,7 @@ reportPrivateUsage = false
159
159
  [tool.ruff]
160
160
  line-length = 120
161
161
  output-format = "grouped"
162
- target-version = "py37"
162
+ target-version = "py38"
163
163
 
164
164
  [tool.ruff.format]
165
165
  docstring-code-format = true
@@ -532,7 +532,10 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
532
532
  is_body_allowed = options.method.lower() != "get"
533
533
 
534
534
  if is_body_allowed:
535
- kwargs["json"] = json_data if is_given(json_data) else None
535
+ if isinstance(json_data, bytes):
536
+ kwargs["content"] = json_data
537
+ else:
538
+ kwargs["json"] = json_data if is_given(json_data) else None
536
539
  kwargs["files"] = files
537
540
  else:
538
541
  headers.pop("Content-Type", None)
@@ -27,6 +27,7 @@ from .resources import (
27
27
  datasets,
28
28
  inference,
29
29
  questions,
30
+ responses,
30
31
  completions,
31
32
  evaluations,
32
33
  dataset_items,
@@ -61,6 +62,7 @@ ENVIRONMENTS: Dict[str, str] = {
61
62
 
62
63
 
63
64
  class SGPClient(SyncAPIClient):
65
+ responses: responses.ResponsesResource
64
66
  completions: completions.CompletionsResource
65
67
  chat: chat.ChatResource
66
68
  inference: inference.InferenceResource
@@ -165,6 +167,7 @@ class SGPClient(SyncAPIClient):
165
167
  _strict_response_validation=_strict_response_validation,
166
168
  )
167
169
 
170
+ self.responses = responses.ResponsesResource(self)
168
171
  self.completions = completions.CompletionsResource(self)
169
172
  self.chat = chat.ChatResource(self)
170
173
  self.inference = inference.InferenceResource(self)
@@ -290,6 +293,7 @@ class SGPClient(SyncAPIClient):
290
293
 
291
294
 
292
295
  class AsyncSGPClient(AsyncAPIClient):
296
+ responses: responses.AsyncResponsesResource
293
297
  completions: completions.AsyncCompletionsResource
294
298
  chat: chat.AsyncChatResource
295
299
  inference: inference.AsyncInferenceResource
@@ -394,6 +398,7 @@ class AsyncSGPClient(AsyncAPIClient):
394
398
  _strict_response_validation=_strict_response_validation,
395
399
  )
396
400
 
401
+ self.responses = responses.AsyncResponsesResource(self)
397
402
  self.completions = completions.AsyncCompletionsResource(self)
398
403
  self.chat = chat.AsyncChatResource(self)
399
404
  self.inference = inference.AsyncInferenceResource(self)
@@ -520,6 +525,7 @@ class AsyncSGPClient(AsyncAPIClient):
520
525
 
521
526
  class SGPClientWithRawResponse:
522
527
  def __init__(self, client: SGPClient) -> None:
528
+ self.responses = responses.ResponsesResourceWithRawResponse(client.responses)
523
529
  self.completions = completions.CompletionsResourceWithRawResponse(client.completions)
524
530
  self.chat = chat.ChatResourceWithRawResponse(client.chat)
525
531
  self.inference = inference.InferenceResourceWithRawResponse(client.inference)
@@ -535,6 +541,7 @@ class SGPClientWithRawResponse:
535
541
 
536
542
  class AsyncSGPClientWithRawResponse:
537
543
  def __init__(self, client: AsyncSGPClient) -> None:
544
+ self.responses = responses.AsyncResponsesResourceWithRawResponse(client.responses)
538
545
  self.completions = completions.AsyncCompletionsResourceWithRawResponse(client.completions)
539
546
  self.chat = chat.AsyncChatResourceWithRawResponse(client.chat)
540
547
  self.inference = inference.AsyncInferenceResourceWithRawResponse(client.inference)
@@ -550,6 +557,7 @@ class AsyncSGPClientWithRawResponse:
550
557
 
551
558
  class SGPClientWithStreamedResponse:
552
559
  def __init__(self, client: SGPClient) -> None:
560
+ self.responses = responses.ResponsesResourceWithStreamingResponse(client.responses)
553
561
  self.completions = completions.CompletionsResourceWithStreamingResponse(client.completions)
554
562
  self.chat = chat.ChatResourceWithStreamingResponse(client.chat)
555
563
  self.inference = inference.InferenceResourceWithStreamingResponse(client.inference)
@@ -565,6 +573,7 @@ class SGPClientWithStreamedResponse:
565
573
 
566
574
  class AsyncSGPClientWithStreamedResponse:
567
575
  def __init__(self, client: AsyncSGPClient) -> None:
576
+ self.responses = responses.AsyncResponsesResourceWithStreamingResponse(client.responses)
568
577
  self.completions = completions.AsyncCompletionsResourceWithStreamingResponse(client.completions)
569
578
  self.chat = chat.AsyncChatResourceWithStreamingResponse(client.chat)
570
579
  self.inference = inference.AsyncInferenceResourceWithStreamingResponse(client.inference)
@@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes:
69
69
  return file
70
70
 
71
71
  if is_tuple_t(file):
72
- return (file[0], _read_file_content(file[1]), *file[2:])
72
+ return (file[0], read_file_content(file[1]), *file[2:])
73
73
 
74
74
  raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
75
75
 
76
76
 
77
- def _read_file_content(file: FileContent) -> HttpxFileContent:
77
+ def read_file_content(file: FileContent) -> HttpxFileContent:
78
78
  if isinstance(file, os.PathLike):
79
79
  return pathlib.Path(file).read_bytes()
80
80
  return file
@@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes:
111
111
  return file
112
112
 
113
113
  if is_tuple_t(file):
114
- return (file[0], await _async_read_file_content(file[1]), *file[2:])
114
+ return (file[0], await async_read_file_content(file[1]), *file[2:])
115
115
 
116
116
  raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple")
117
117
 
118
118
 
119
- async def _async_read_file_content(file: FileContent) -> HttpxFileContent:
119
+ async def async_read_file_content(file: FileContent) -> HttpxFileContent:
120
120
  if isinstance(file, os.PathLike):
121
121
  return await anyio.Path(file).read_bytes()
122
122
 
@@ -208,14 +208,18 @@ class BaseModel(pydantic.BaseModel):
208
208
  else:
209
209
  fields_values[name] = field_get_default(field)
210
210
 
211
+ extra_field_type = _get_extra_fields_type(__cls)
212
+
211
213
  _extra = {}
212
214
  for key, value in values.items():
213
215
  if key not in model_fields:
216
+ parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value
217
+
214
218
  if PYDANTIC_V2:
215
- _extra[key] = value
219
+ _extra[key] = parsed
216
220
  else:
217
221
  _fields_set.add(key)
218
- fields_values[key] = value
222
+ fields_values[key] = parsed
219
223
 
220
224
  object.__setattr__(m, "__dict__", fields_values)
221
225
 
@@ -370,6 +374,23 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object:
370
374
  return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None))
371
375
 
372
376
 
377
+ def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None:
378
+ if not PYDANTIC_V2:
379
+ # TODO
380
+ return None
381
+
382
+ schema = cls.__pydantic_core_schema__
383
+ if schema["type"] == "model":
384
+ fields = schema["schema"]
385
+ if fields["type"] == "model-fields":
386
+ extras = fields.get("extras_schema")
387
+ if extras and "cls" in extras:
388
+ # mypy can't narrow the type
389
+ return extras["cls"] # type: ignore[no-any-return]
390
+
391
+ return None
392
+
393
+
373
394
  def is_basemodel(type_: type) -> bool:
374
395
  """Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`"""
375
396
  if is_union(type_):
@@ -439,7 +460,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]
439
460
  type_ = type_.__value__ # type: ignore[unreachable]
440
461
 
441
462
  # unwrap `Annotated[T, ...]` -> `T`
442
- if metadata is not None:
463
+ if metadata is not None and len(metadata) > 0:
443
464
  meta: tuple[Any, ...] = tuple(metadata)
444
465
  elif is_annotated_type(type_):
445
466
  meta = get_args(type_)[1:]
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "scale_gp_beta"
4
- __version__ = "0.1.0-alpha.29" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.30" # x-release-please-version
@@ -0,0 +1,53 @@
1
+ # Custom Code Patch
2
+ You can in theory add custom code patches to anywhere in the repo but at the risk of encountering many merge conflicts with Stainless into the future.
3
+ Stainless will never use the `/lib` and `/examples` directories. When possible try to only modify these directories.
4
+ If you have to add custom code elsewhere, please keep the footprint small and create a library for most of the logic.
5
+
6
+
7
+ For information on custom code patching with Stainless see [here](https://www.stainless.com/docs/guides/add-custom-code).
8
+
9
+ # Process for Adding Features
10
+ Checkout the `next` branch and pull, then create a branch from `next`.
11
+
12
+ > **_NOTE:_** Stainless uses next to "queue up" updates to the SDK.
13
+ >
14
+ > Stainless will update next with their own logic updates to the SDK along with any changes in the OpenAPI spec and changes to the Stainless
15
+ config on their SaaS platform.
16
+
17
+ Make any code changes you need. Ensuring all the tests for the library are passing.
18
+
19
+ There is strict linting in this repo. Use the following commands in order.
20
+
21
+ ```bash
22
+ rye lint --fix
23
+ ```
24
+
25
+ ```bash
26
+ rye run lint | grep /specific_file.py
27
+ ```
28
+
29
+ `rye run lint` will not work if there are errors with `rye lint --fix`.
30
+ I am unsure why but I get many errors which are ignorable in the rest of the repo when running `rye run lint` so I usually use it
31
+ with grep to target the file I am developing.
32
+
33
+ > **_NOTE:_** The strict linting requires all types to be strictly typed. This can be a pain but is worth considering before developing any new solution.
34
+ > Try and avoid using ignore commands when possible, but sometimes it is unavoidable (see OpenAI tracing Plugin).
35
+
36
+ When commiting, use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec. Usually this is something like:
37
+
38
+ ```bash
39
+ git commit -m "feat: Added OpenAI tracing processor"
40
+ ```
41
+ This allow Stainless to update the release doc with more useful info.
42
+
43
+ **When creating a PR, you must manually change the destination from `main` to `next`.**
44
+
45
+ Once merged, Stainless should pick up the changes and update or create a new PR for `main`.
46
+ You will need to accept changes on this PR, Stainless should then auto merge. Note on occasion I have had to manually merge.
47
+ There was no consequence to this.
48
+
49
+ These PRs Stainless makes have 4 types of changes, all are merged to main via these automatic PR requests:
50
+ 1. Custom Code Changes
51
+ 2. Stainless SDK logic changes
52
+ 3. Changes to the Stainless Config in the SaaS platform
53
+ 4. Changes to the OpenAPI schema
@@ -11,6 +11,8 @@ from .util import configure, is_disabled
11
11
  from .trace_exporter import TraceExporter
12
12
 
13
13
  if TYPE_CHECKING:
14
+ import httpx
15
+
14
16
  from .span import Span
15
17
  from .trace import Trace
16
18
 
@@ -44,6 +46,7 @@ class TraceQueueManager:
44
46
  worker_enabled: Optional[bool] = None,
45
47
  ):
46
48
  self._client = client
49
+ self.register_client(client) if client else None
47
50
  self._attempted_local_client_creation = False
48
51
  self._trigger_queue_size = trigger_queue_size
49
52
  self._trigger_cadence = trigger_cadence
@@ -68,6 +71,17 @@ class TraceQueueManager:
68
71
  log.info("Registering client")
69
72
  self._client = client
70
73
 
74
+ original_prepare_request = self._client._prepare_request
75
+
76
+ def custom_prepare_request(request: "httpx.Request") -> None:
77
+ original_prepare_request(request)
78
+
79
+ # TODO: Hook logic here, we should check to see if we are in the scope of a span, if so we should inject
80
+ # appropriate headers into the request
81
+ # current_span = Scope.get_current_span()
82
+
83
+ self._client._prepare_request = custom_prepare_request # type: ignore
84
+
71
85
  def shutdown(self, timeout: Optional[float] = None) -> None:
72
86
  if not self._worker_enabled:
73
87
  log.debug("No worker to shutdown")
@@ -56,6 +56,14 @@ from .questions import (
56
56
  QuestionsResourceWithStreamingResponse,
57
57
  AsyncQuestionsResourceWithStreamingResponse,
58
58
  )
59
+ from .responses import (
60
+ ResponsesResource,
61
+ AsyncResponsesResource,
62
+ ResponsesResourceWithRawResponse,
63
+ AsyncResponsesResourceWithRawResponse,
64
+ ResponsesResourceWithStreamingResponse,
65
+ AsyncResponsesResourceWithStreamingResponse,
66
+ )
59
67
  from .completions import (
60
68
  CompletionsResource,
61
69
  AsyncCompletionsResource,
@@ -90,6 +98,12 @@ from .evaluation_items import (
90
98
  )
91
99
 
92
100
  __all__ = [
101
+ "ResponsesResource",
102
+ "AsyncResponsesResource",
103
+ "ResponsesResourceWithRawResponse",
104
+ "AsyncResponsesResourceWithRawResponse",
105
+ "ResponsesResourceWithStreamingResponse",
106
+ "AsyncResponsesResourceWithStreamingResponse",
93
107
  "CompletionsResource",
94
108
  "AsyncCompletionsResource",
95
109
  "CompletionsResourceWithRawResponse",
@@ -522,6 +522,7 @@ class CompletionsResource(SyncAPIResource):
522
522
  def models(
523
523
  self,
524
524
  *,
525
+ check_availability: bool | NotGiven = NOT_GIVEN,
525
526
  ending_before: str | NotGiven = NOT_GIVEN,
526
527
  limit: int | NotGiven = NOT_GIVEN,
527
528
  model_vendor: Literal[
@@ -569,6 +570,7 @@ class CompletionsResource(SyncAPIResource):
569
570
  timeout=timeout,
570
571
  query=maybe_transform(
571
572
  {
573
+ "check_availability": check_availability,
572
574
  "ending_before": ending_before,
573
575
  "limit": limit,
574
576
  "model_vendor": model_vendor,
@@ -1077,6 +1079,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1077
1079
  async def models(
1078
1080
  self,
1079
1081
  *,
1082
+ check_availability: bool | NotGiven = NOT_GIVEN,
1080
1083
  ending_before: str | NotGiven = NOT_GIVEN,
1081
1084
  limit: int | NotGiven = NOT_GIVEN,
1082
1085
  model_vendor: Literal[
@@ -1124,6 +1127,7 @@ class AsyncCompletionsResource(AsyncAPIResource):
1124
1127
  timeout=timeout,
1125
1128
  query=await async_maybe_transform(
1126
1129
  {
1130
+ "check_availability": check_availability,
1127
1131
  "ending_before": ending_before,
1128
1132
  "limit": limit,
1129
1133
  "model_vendor": model_vendor,