diff --git a/langgraph-tutorial/__pycache__/config.cpython-313.pyc b/langgraph-tutorial/__pycache__/config.cpython-313.pyc deleted file mode 100644 index 56fc2f3..0000000 Binary files a/langgraph-tutorial/__pycache__/config.cpython-313.pyc and /dev/null differ diff --git a/langgraph-tutorial/debug_api.py b/langgraph-tutorial/debug_api.py deleted file mode 100644 index 5845b59..0000000 --- a/langgraph-tutorial/debug_api.py +++ /dev/null @@ -1,47 +0,0 @@ -import requests -import json - -url = "https://gw2.oops.asia/v1/chat/completions" -headers = { - "Content-Type": "application/json", - "Authorization": "Bearer sk-f5ba1acb1d61c39f754c28f19d0e6e1b7d8d9fda43ef812ce4e335b6c26eff01" -} - -# 测试不同的请求格式 -test_cases = [ - { - "name": "标准格式", - "body": { - "model": "gpt-5.4-mini", - "messages": [{"role": "user", "content": "Say hi"}], - "max_tokens": 20 - } - }, - { - "name": "带 temperature", - "body": { - "model": "gpt-5.4-mini", - "messages": [{"role": "user", "content": "Say hi"}], - "max_tokens": 20, - "temperature": 0.3 - } - }, - { - "name": "带 stream", - "body": { - "model": "gpt-5.4-mini", - "messages": [{"role": "user", "content": "Say hi"}], - "max_tokens": 20, - "stream": False - } - } -] - -for test in test_cases: - print(f"\n测试: {test['name']}") - try: - response = requests.post(url, headers=headers, json=test["body"], timeout=10) - print(f" 状态码: {response.status_code}") - print(f" 响应: {response.text[:200]}") - except Exception as e: - print(f" 错误: {e}") \ No newline at end of file diff --git a/langgraph-tutorial/list_models.py b/langgraph-tutorial/list_models.py deleted file mode 100644 index 9495681..0000000 --- a/langgraph-tutorial/list_models.py +++ /dev/null @@ -1,12 +0,0 @@ -from openai import OpenAI - -client = OpenAI( - api_key="sk-f5ba1acb1d61c39f754c28f19d0e6e1b7d8d9fda43ef812ce4e335b6c26eff01", - base_url="https://gw2.oops.asia/v1" -) - -models = client.models.list() -print("支持的模型列表:") -print("-" * 50) -for m in models: - print(f" {m.id}") \ No newline at end of file diff --git a/langgraph-tutorial/test_api.py b/langgraph-tutorial/test_api.py deleted file mode 100644 index c487ed6..0000000 --- a/langgraph-tutorial/test_api.py +++ /dev/null @@ -1,13 +0,0 @@ -from openai import OpenAI - -client = OpenAI( - api_key="sk-f5ba1acb1d61c39f754c28f19d0e6e1b7d8d9fda43ef812ce4e335b6c26eff01", - base_url="https://gw2.oops.asia/v1" -) - -response = client.chat.completions.create( - model="gpt-5.4-mini", - messages=[{"role": "user", "content": "Say hi in Chinese"}], - max_tokens=20 -) -print(response.choices[0].message.content) \ No newline at end of file diff --git a/langgraph-tutorial/test_models.py b/langgraph-tutorial/test_models.py deleted file mode 100644 index 3c7f2ae..0000000 --- a/langgraph-tutorial/test_models.py +++ /dev/null @@ -1,23 +0,0 @@ -from openai import OpenAI - -client = OpenAI( - api_key="sk-f5ba1acb1d61c39f754c28f19d0e6e1b7d8d9fda43ef812ce4e335b6c26eff01", - base_url="https://gw2.oops.asia/v1" -) - -models_to_test = ["gpt-4o-mini", "gpt-4o", "gpt-3.5-turbo", "gpt-5", "gpt-5.5", "claude-sonnet-4-20250514"] - -print("测试可用模型:") -print("-" * 50) - -for model in models_to_test: - try: - response = client.chat.completions.create( - model=model, - messages=[{"role": "user", "content": "Say hi"}], - max_tokens=20 - ) - print(f" ✅ {model} - OK") - except Exception as e: - error_msg = str(e)[:50] - print(f" ❌ {model} - {error_msg}") \ No newline at end of file