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 response interceptor #92

Closed
sashirestela opened this issue Jan 16, 2025 Discussed in #86 · 4 comments · Fixed by #97
Closed

Add response interceptor #92

sashirestela opened this issue Jan 16, 2025 Discussed in #86 · 4 comments · Fixed by #97
Assignees
Labels
enhancement New feature or request

Comments

@sashirestela
Copy link
Owner

Discussed in #86

Originally posted by the-gigi January 2, 2025
The idea is similar to the request interceptor, which allows users to register a hook that can modify the request just before it is sent.

The motivation is a bug in the OpenAI compatibility of the Gemini API, which can be worked around by modifying the response coming back from Gemini.

See https://discuss.ai.google.dev/t/openai-compatibility-bug-in-response-object/58484

@sashirestela you mentioned in this simple-openai issue that I should open a cleverclient issue, but them said that it would be more difficult:
sashirestela/simple-openai#248 (comment)

So, instead of opening an issue I'm starting this discussion to understand the difficulty.

@sashirestela sashirestela added the enhancement New feature or request label Jan 16, 2025
@sashirestela sashirestela self-assigned this Jan 16, 2025
@the-gigi
Copy link
Contributor

This is great. Thanks @sashirestela

@the-gigi
Copy link
Contributor

@sashirestela I'm happy to report that this works like a charm. All our integration tests now work with Gemini.

@sashirestela
Copy link
Owner Author

@the-gigi so, are you in a better position to retake this sashirestela/simple-openai#248?

@the-gigi
Copy link
Contributor

@sashirestela Yes. I need to find the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants