Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ai-proxy plugin #11499
feat: ai-proxy plugin #11499
Changes from all commits
b98a48f
8188ae4
7b83b3a
97cafa5
35b1787
e18caef
28f06ae
82f9692
0577e8e
e5f00f7
c307b04
ef4cf84
4bf6bd2
42adfd1
0af00ae
aff56a0
f25f21a
d2d253e
58ca8a7
f146f20
2317aa8
3ac0fe5
6e31cfe
e302360
83f2197
bcc21cb
10a07c1
7220c08
a4afb30
6248005
e88683c
7d9c075
9823570
94d00f4
b24e439
5ca70f3
284ad76
6baa7d1
bdab563
2d0a7a1
530448f
ed11fa4
cba307a
3febd29
e566a37
4c13cef
28c9c4d
780561d
4ffdd85
0521f89
bd8309b
6f5d158
d4f3a5a
1bfeac9
25975c0
7c77ed6
fa46abe
45e4f98
99af867
11aef59
4eb0ff4
92ebd9d
c0dc59e
99cf3a4
243b5f5
217b5af
6661a0e
1c00e2c
37cdd7b
1062cc2
7b23623
4278fd5
d915292
8c3bcb3
bcca3f2
929cbb1
e149170
d346d38
3429e03
7c08290
977cf68
073b3f8
5831108
ab4c37e
cdd37db
e0e3e15
f6768e4
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also using body_reader, ngx_print * N + ngx_flush * 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what you mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose is to save the intermediate buffering process and directly
write the response body to the response buffer by calling ngx.print
multiple times. Finally, call ngx.flush once more.
But,
$ restydoc -s ngx.print
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it, I think we don't need
ngx_print * N + ngx_flush * 1
as reading the response body all at once is favourable for"stream": false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shreemaan-abhishek Is it resolved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also
keepalive
before returning?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace with httpc:request_uri to avoid invoking close or keepalive elsewhere?
#11450
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
request_uri
doesn't allow streaming responses.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to support streaming chunk outside, so
httpc:request
here.But remember httpc:close when conf.keepalive is false.