timigogo commited on
Commit
449d451
Β·
verified Β·
1 Parent(s): e1db8b8

Upload 14 files

Browse files
Files changed (2) hide show
  1. src/lib/model-map.js +12 -0
  2. src/routes/chat.js +0 -6
src/lib/model-map.js CHANGED
@@ -80,6 +80,18 @@ const modelMap = {
80
  "max_completion_tokens": 100000
81
  }
82
  },
 
 
 
 
 
 
 
 
 
 
 
 
83
  "chatgpt-4o-latest": {
84
  "provider": "openai",
85
  "name": "chatgpt-4o-latest",
 
80
  "max_completion_tokens": 100000
81
  }
82
  },
83
+ "o3": {
84
+ "provider": "openai",
85
+ "name": "o3",
86
+ "model_config_display_name": null,
87
+ "parameters": {
88
+ "response_format": {
89
+ "type": "text"
90
+ },
91
+ "reasoning_effort": "high",
92
+ "max_completion_tokens": 100000
93
+ }
94
+ },
95
  "chatgpt-4o-latest": {
96
  "provider": "openai",
97
  "name": "chatgpt-4o-latest",
src/routes/chat.js CHANGED
@@ -131,9 +131,6 @@ async function getChatID(req, res) {
131
  data.prompt_blueprint.metadata.model = model_data
132
  console.log(`ζ¨‘εž‹ε‚ζ•°: ${data.prompt_blueprint.metadata.model}`)
133
 
134
- // Log raw JSON being sent to PromptLayer for getChatID
135
- console.log('Raw JSON sent to PromptLayer (getChatID):\n', JSON.stringify(data, null, 2));
136
-
137
  const response = await axios.put(url, data, { headers })
138
  if (response.data.success) {
139
  console.log(`η”ŸζˆδΌšθ―ID成功: ${response.data.playground_session.id}`)
@@ -197,9 +194,6 @@ async function sentRequest(req, res) {
197
  }
198
  data.shared_prompt_blueprint.metadata.model = model_data
199
 
200
- // Log raw JSON being sent to PromptLayer for sentRequest
201
- console.log('Raw JSON sent to PromptLayer (sentRequest):\n', JSON.stringify(data, null, 2));
202
-
203
  const response = await axios.post(url, data, { headers })
204
  if (response.data.success) {
205
  return response.data.run_group.individual_run_requests[0].id
 
131
  data.prompt_blueprint.metadata.model = model_data
132
  console.log(`ζ¨‘εž‹ε‚ζ•°: ${data.prompt_blueprint.metadata.model}`)
133
 
 
 
 
134
  const response = await axios.put(url, data, { headers })
135
  if (response.data.success) {
136
  console.log(`η”ŸζˆδΌšθ―ID成功: ${response.data.playground_session.id}`)
 
194
  }
195
  data.shared_prompt_blueprint.metadata.model = model_data
196
 
 
 
 
197
  const response = await axios.post(url, data, { headers })
198
  if (response.data.success) {
199
  return response.data.run_group.individual_run_requests[0].id