Skip to content

Commit cc4b985

Browse files
cursoragentalex
andcommitted
Remove o3 integration tests, update README, add o3 responses example
Co-authored-by: alex <alex@agentops.ai>
1 parent aa6e3f9 commit cc4b985

5 files changed

Lines changed: 24 additions & 420 deletions

File tree

examples/openai/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,16 @@ Example: `web_search`
3939
This example demonstrates:
4040
- Web search functionality
4141

42-
### 5. o3 Responses API Integration
42+
### 5. o3 Responses API
4343

44-
Example: `o3_responses_integration_test` and `test_o3_integration`
44+
Example: `o3_responses_example`
4545

46-
These examples demonstrate:
46+
This example demonstrates:
4747
- OpenAI's o3 reasoning model with the Responses API
4848
- Tool calls and structured reasoning
4949
- Complex decision-making scenarios
5050
- AgentOps integration with reasoning models
5151

52-
See `README_o3_integration.md` for detailed documentation.
53-
5452
## AgentOps Integration
5553

5654
These examples show how to use AgentOps to monitor and analyze your AI applications. AgentOps automatically instruments your OpenAI calls to provide insights into performance, usage patterns, and model behavior.

examples/openai/README_o3_integration.md

Lines changed: 0 additions & 142 deletions
This file was deleted.

examples/openai/o3_responses_integration_test.py renamed to examples/openai/o3_responses_example.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# OpenAI o3 Responses API Integration Test
1+
# OpenAI o3 Responses API Example
22
#
33
# This example demonstrates AgentOps integration with OpenAI's o3 reasoning model
44
# through the Responses API. The o3 model excels at complex problem solving and
55
# multi-step reasoning with tool calls.
66
#
7-
# This test creates a simple decision-making agent that uses the o3 model to
7+
# This example creates a simple decision-making agent that uses the o3 model to
88
# make choices based on available options, similar to the Pokémon battle example
9-
# but simplified for testing purposes.
9+
# but simplified.
1010

1111
import openai
1212
import agentops
@@ -22,10 +22,10 @@
2222
os.environ["AGENTOPS_API_KEY"] = os.getenv("AGENTOPS_API_KEY", "your_api_key_here")
2323

2424
# Initialize AgentOps
25-
agentops.init(trace_name="o3-responses-test", tags=["o3", "responses-api", "integration-test"])
25+
agentops.init(trace_name="o3-responses-example", tags=["o3", "responses-api"])
2626
tracer = agentops.start_trace(
27-
trace_name="o3 Responses API Integration Test",
28-
tags=["o3", "responses-api", "integration-test"]
27+
trace_name="o3 Responses API Example",
28+
tags=["o3", "responses-api"]
2929
)
3030

3131
# Initialize OpenAI client
@@ -154,14 +154,14 @@ def make_decision(self, scenario: str, available_actions: List[str]) -> Dict[str
154154
"scenario": scenario
155155
}
156156

157-
def run_integration_test():
158-
"""Run the integration test with multiple scenarios."""
157+
def run_example():
158+
"""Run the example with multiple scenarios."""
159159

160160
# Create the agent
161161
agent = O3DecisionAgent(model="o3")
162162

163-
# Test scenarios
164-
test_scenarios = [
163+
# Example scenarios
164+
scenarios = [
165165
{
166166
"scenario": "You're in a battle and your opponent has a strong defensive position. You need to choose your next move carefully.",
167167
"actions": ["attack_aggressively", "defend_and_wait", "use_special_ability", "retreat_temporarily"]
@@ -178,14 +178,14 @@ def run_integration_test():
178178

179179
results = []
180180

181-
for i, test_case in enumerate(test_scenarios, 1):
181+
for i, scenario in enumerate(scenarios, 1):
182182
print(f"\n{'='*60}")
183-
print(f"Test Case {i}")
183+
print(f"Scenario {i}")
184184
print(f"{'='*60}")
185185

186186
result = agent.make_decision(
187-
scenario=test_case["scenario"],
188-
available_actions=test_case["actions"]
187+
scenario=scenario["scenario"],
188+
available_actions=scenario["actions"]
189189
)
190190
results.append(result)
191191

@@ -195,19 +195,19 @@ def run_integration_test():
195195
return results
196196

197197
def main():
198-
"""Main function to run the integration test."""
199-
print("Starting OpenAI o3 Responses API Integration Test")
198+
"""Main function to run the example."""
199+
print("Starting OpenAI o3 Responses API Example")
200200
print("=" * 60)
201201

202202
try:
203-
results = run_integration_test()
203+
results = run_example()
204204

205205
print(f"\n{'='*60}")
206-
print("Integration Test Summary")
206+
print("Example Summary")
207207
print(f"{'='*60}")
208208

209209
for i, result in enumerate(results, 1):
210-
print(f"Test {i}: {result['action']}")
210+
print(f"Scenario {i}: {result['action']}")
211211

212212
# End the trace
213213
agentops.end_trace(tracer, end_state="Success")
@@ -220,13 +220,13 @@ def main():
220220
try:
221221
validation_result = agentops.validate_trace_spans(trace_context=tracer)
222222
agentops.print_validation_summary(validation_result)
223-
print("✅ Integration test completed successfully!")
223+
print("✅ Example completed successfully!")
224224
except agentops.ValidationError as e:
225225
print(f"❌ Error validating spans: {e}")
226226
raise
227227

228228
except Exception as e:
229-
print(f"❌ Integration test failed: {e}")
229+
print(f"❌ Example failed: {e}")
230230
agentops.end_trace(tracer, end_state="Error")
231231
raise
232232

examples/openai/run_o3_tests.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

0 commit comments

Comments
 (0)