Skip to content
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

add stop sequence config for openAI chat config model #695

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

sebastienblanc
Copy link
Contributor

As specified here in a chat completion request we should be able to pass a stop parameter containing a string or list of strings.
It's implemented in upstream langchain4j , this PR just add it to the config and the recorder.

@sebastienblanc sebastienblanc requested a review from a team as a code owner June 20, 2024 22:12
@geoand
Copy link
Collaborator

geoand commented Jun 21, 2024

It would be great if we could have some kind of test for this

@sebastienblanc
Copy link
Contributor Author

It would be great if we could have some kind of test for this

I agree but honestly how can we test this without hitting a real openAI endpoint ?

@geoand
Copy link
Collaborator

geoand commented Jun 21, 2024

Can't we use Wiremock and configure it to respond with what OpenAI responds with and then just validate that we sent what we expected to send?

@sebastienblanc
Copy link
Contributor Author

Can't we use Wiremock and configure it to respond with what OpenAI responds with and then just validate that we sent what we expected to send?

I have been looking a bit around but tbh I have not a clear idea on how to write this test. You say you just want to test the request is well formed ?

@geoand
Copy link
Collaborator

geoand commented Jul 3, 2024

My idea is to validate that the request is what you expect it to be and have the response be whatever OpenAI gives (which you would hardcode by just copying the response from a real OpenAI request)

@geoand geoand merged commit e7f6346 into quarkiverse:main Jul 4, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants