mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-05 13:35:21 +02:00
improvements(ai): Improve AI streaming UI/UX interactions + better separation of AI provider responsibilities (#2039)
* Start refactor * Interface updates * Rework Assistant, Provider, and tests for better domain boundaries * Consolidate and simplify OpenAI provider and provider concepts * Clean up assistant streaming * Improve assistant message orchestration logic * Clean up "thinking" UI interactions * Remove stale class * Regenerate VCR test responses
This commit is contained in:
parent
6331788b33
commit
5cf758bd03
33 changed files with 1179 additions and 624 deletions
|
@ -5,8 +5,7 @@ http_interactions:
|
|||
uri: https://api.openai.com/v1/responses
|
||||
body:
|
||||
encoding: UTF-8
|
||||
string: '{"model":"invalid-model-that-will-trigger-api-error","input":[{"role":"user","content":"Error
|
||||
test"}],"instructions":null,"tools":[],"previous_response_id":null,"stream":true}'
|
||||
string: '{"model":"invalid-model-that-will-trigger-api-error","input":[{"role":"user","content":"Test"}],"instructions":null,"tools":[],"previous_response_id":null,"stream":null}'
|
||||
headers:
|
||||
Content-Type:
|
||||
- application/json
|
||||
|
@ -24,7 +23,7 @@ http_interactions:
|
|||
message: Bad Request
|
||||
headers:
|
||||
Date:
|
||||
- Wed, 26 Mar 2025 21:27:19 GMT
|
||||
- Mon, 31 Mar 2025 20:38:55 GMT
|
||||
Content-Type:
|
||||
- application/json
|
||||
Content-Length:
|
||||
|
@ -36,25 +35,25 @@ http_interactions:
|
|||
Openai-Organization:
|
||||
- "<OPENAI_ORGANIZATION_ID>"
|
||||
X-Request-Id:
|
||||
- req_2b86e02f664e790dfa475f111402b722
|
||||
- req_3981f27aa18db734b3dd530fa2929b95
|
||||
Openai-Processing-Ms:
|
||||
- '146'
|
||||
- '113'
|
||||
Strict-Transport-Security:
|
||||
- max-age=31536000; includeSubDomains; preload
|
||||
Cf-Cache-Status:
|
||||
- DYNAMIC
|
||||
Set-Cookie:
|
||||
- __cf_bm=gAU0gS_ZQBfQmFkc_jKM73dhkNISbBY9FlQjGnZ6CfU-1743024439-1.0.1.1-bWRoC737.SOJPZrP90wTJLVmelTpxFqIsrunq2Lqgy4J3VvLtYBEBrqY0v4d94F5fMcm0Ju.TfQi0etmvqZtUSMRn6rvkMLmXexRcxP.1jE;
|
||||
path=/; expires=Wed, 26-Mar-25 21:57:19 GMT; domain=.api.openai.com; HttpOnly;
|
||||
- __cf_bm=8KUMK_Gp4f97KLactyy3QniUZbNmN9Zwbx9WowYCc98-1743453535-1.0.1.1-opjT17tCwi9U0AukBXoHrpPEcC4Z.GIyEt.AjjrzRWln62SWPIvggY4L19JabZu09.9cmxfyrwAFHmvDeCVxSWqAVf88PAZwwRICkZZUut0;
|
||||
path=/; expires=Mon, 31-Mar-25 21:08:55 GMT; domain=.api.openai.com; HttpOnly;
|
||||
Secure; SameSite=None
|
||||
- _cfuvid=XnxX4KU80himuKAUavZYtkQasOjXJDJD.QLyMrfBSUU-1743024439792-0.0.1.1-604800000;
|
||||
- _cfuvid=uZB07768IynyRRP6oxwcnC4Rfn.lGT1yRhzzGvNw0kc-1743453535322-0.0.1.1-604800000;
|
||||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
|
||||
X-Content-Type-Options:
|
||||
- nosniff
|
||||
Server:
|
||||
- cloudflare
|
||||
Cf-Ray:
|
||||
- 9269bb3b2c14cf74-CMH
|
||||
- 9292a7327d5161d6-ORD
|
||||
Alt-Svc:
|
||||
- h3=":443"; ma=86400
|
||||
body:
|
||||
|
@ -68,5 +67,5 @@ http_interactions:
|
|||
"code": "model_not_found"
|
||||
}
|
||||
}
|
||||
recorded_at: Wed, 26 Mar 2025 21:27:19 GMT
|
||||
recorded_at: Mon, 31 Mar 2025 20:38:55 GMT
|
||||
recorded_with: VCR 6.3.1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue