Spaces:
Sleeping
Sleeping
Update Web/backend/main.py
Browse files- Web/backend/main.py +14 -14
Web/backend/main.py
CHANGED
|
@@ -296,9 +296,9 @@ async def detect_distortion(request: DetectionRequest):
|
|
| 296 |
dot_analysis = await client.post(
|
| 297 |
f"{API_base}prompts/templates/execute",
|
| 298 |
json={
|
| 299 |
-
"provider": "
|
| 300 |
"template_name": "dot.analysis",
|
| 301 |
-
"model": "
|
| 302 |
"variables": {
|
| 303 |
"situation": request.situation,
|
| 304 |
"thought": request.thought
|
|
@@ -318,9 +318,9 @@ async def detect_distortion(request: DetectionRequest):
|
|
| 318 |
dot_detection = await client.post(
|
| 319 |
f"{API_base}prompts/templates/execute",
|
| 320 |
json={
|
| 321 |
-
"provider": "
|
| 322 |
"template_name": "dot.detection",
|
| 323 |
-
"model": "
|
| 324 |
"variables": {
|
| 325 |
"situation": request.situation,
|
| 326 |
"thought": request.thought,
|
|
@@ -406,9 +406,9 @@ async def analyze_thought(request: AnalyzeRequest):
|
|
| 406 |
thera_rcm = await client.post(
|
| 407 |
f"{API_base}prompts/templates/execute",
|
| 408 |
json={
|
| 409 |
-
"provider": "
|
| 410 |
"template_name": "dot.thera_rcm",
|
| 411 |
-
"model": "
|
| 412 |
"variables": {
|
| 413 |
"situation": request.situation,
|
| 414 |
"thought": request.thought,
|
|
@@ -516,9 +516,9 @@ async def generate_reframe(request: ReframeRequest):
|
|
| 516 |
response = await client.post(
|
| 517 |
f"{API_base}prompts/templates/execute",
|
| 518 |
json={
|
| 519 |
-
"provider": "
|
| 520 |
"template_name": f"reframe.{therapy.lower()}",
|
| 521 |
-
"model": "
|
| 522 |
"variables": {
|
| 523 |
"situation": request.situation,
|
| 524 |
"thought": request.thought,
|
|
@@ -544,9 +544,9 @@ async def generate_reframe(request: ReframeRequest):
|
|
| 544 |
feedback = await client.post(
|
| 545 |
f"{API_base}prompts/templates/execute",
|
| 546 |
json={
|
| 547 |
-
"provider": "
|
| 548 |
"template_name": f"dot.thera_supervisor",
|
| 549 |
-
"model": "
|
| 550 |
"variables": {
|
| 551 |
"situation": request.situation,
|
| 552 |
"thought": request.thought,
|
|
@@ -590,9 +590,9 @@ async def generate_instruction_feedback(request: FeedbackRequest):
|
|
| 590 |
ai_feedback = await client.post(
|
| 591 |
f"{API_base}prompts/templates/execute",
|
| 592 |
json={
|
| 593 |
-
"provider": "
|
| 594 |
"template_name": "reframe.thera_supervisor_full",
|
| 595 |
-
"model": "
|
| 596 |
"variables": {
|
| 597 |
"situation": request.situation,
|
| 598 |
"thought": request.thought,
|
|
@@ -633,9 +633,9 @@ async def generate_improve_reframe(request: ImproveRequest):
|
|
| 633 |
response = await client.post(
|
| 634 |
f"{API_base}prompts/templates/execute",
|
| 635 |
json={
|
| 636 |
-
"provider": "
|
| 637 |
"template_name": "reframe.cbtwfeedback",
|
| 638 |
-
"model": "
|
| 639 |
"variables": {
|
| 640 |
"situation": request.situation,
|
| 641 |
"thought": request.thought,
|
|
|
|
| 296 |
dot_analysis = await client.post(
|
| 297 |
f"{API_base}prompts/templates/execute",
|
| 298 |
json={
|
| 299 |
+
"provider": "openai",
|
| 300 |
"template_name": "dot.analysis",
|
| 301 |
+
"model": "gpt-4.1",
|
| 302 |
"variables": {
|
| 303 |
"situation": request.situation,
|
| 304 |
"thought": request.thought
|
|
|
|
| 318 |
dot_detection = await client.post(
|
| 319 |
f"{API_base}prompts/templates/execute",
|
| 320 |
json={
|
| 321 |
+
"provider": "openai",
|
| 322 |
"template_name": "dot.detection",
|
| 323 |
+
"model": "gpt-4.1",
|
| 324 |
"variables": {
|
| 325 |
"situation": request.situation,
|
| 326 |
"thought": request.thought,
|
|
|
|
| 406 |
thera_rcm = await client.post(
|
| 407 |
f"{API_base}prompts/templates/execute",
|
| 408 |
json={
|
| 409 |
+
"provider": "openai",
|
| 410 |
"template_name": "dot.thera_rcm",
|
| 411 |
+
"model": "gpt-4.1",
|
| 412 |
"variables": {
|
| 413 |
"situation": request.situation,
|
| 414 |
"thought": request.thought,
|
|
|
|
| 516 |
response = await client.post(
|
| 517 |
f"{API_base}prompts/templates/execute",
|
| 518 |
json={
|
| 519 |
+
"provider": "openai",
|
| 520 |
"template_name": f"reframe.{therapy.lower()}",
|
| 521 |
+
"model": "gpt-4.1",
|
| 522 |
"variables": {
|
| 523 |
"situation": request.situation,
|
| 524 |
"thought": request.thought,
|
|
|
|
| 544 |
feedback = await client.post(
|
| 545 |
f"{API_base}prompts/templates/execute",
|
| 546 |
json={
|
| 547 |
+
"provider": "openai",
|
| 548 |
"template_name": f"dot.thera_supervisor",
|
| 549 |
+
"model": "gpt-4.1",
|
| 550 |
"variables": {
|
| 551 |
"situation": request.situation,
|
| 552 |
"thought": request.thought,
|
|
|
|
| 590 |
ai_feedback = await client.post(
|
| 591 |
f"{API_base}prompts/templates/execute",
|
| 592 |
json={
|
| 593 |
+
"provider": "openai",
|
| 594 |
"template_name": "reframe.thera_supervisor_full",
|
| 595 |
+
"model": "gpt-4.1",
|
| 596 |
"variables": {
|
| 597 |
"situation": request.situation,
|
| 598 |
"thought": request.thought,
|
|
|
|
| 633 |
response = await client.post(
|
| 634 |
f"{API_base}prompts/templates/execute",
|
| 635 |
json={
|
| 636 |
+
"provider": "openai",
|
| 637 |
"template_name": "reframe.cbtwfeedback",
|
| 638 |
+
"model": "gpt-4.1",
|
| 639 |
"variables": {
|
| 640 |
"situation": request.situation,
|
| 641 |
"thought": request.thought,
|