Skip to content

Stubbing out new Responses API #773

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

Draft
wants to merge 58 commits into
base: main
Choose a base branch
from
Draft

Stubbing out new Responses API #773

wants to merge 58 commits into from

Conversation

mongodben
Copy link
Collaborator

@mongodben mongodben commented Jun 11, 2025

Jira EAI 945

Changes

  • Stubbing new MongoDB version of the OpenAI Responses API
    • This is to be main, more flexible version of the chatbot to be used across clients.

Notes

Ben Perlmutter and others added 30 commits April 28, 2025 12:08
* refactor GenerateRespose

* Clean up imports

* consolidate generate user prompt to the legacy file

* update test config imports

* Fix broken tests

* (EAI-989): Refactor verified answers to wrap `GenerateResponse` (#688)

verified answer generate response

Co-authored-by: Ben Perlmutter <[email protected]>

* handle streaming

* separate generateresponse

* typo fix

---------

Co-authored-by: Ben Perlmutter <[email protected]>
Ben Perlmutter and others added 22 commits May 29, 2025 10:07
* refactor GenerateRespose

* Clean up imports

* consolidate generate user prompt to the legacy file

* update test config imports

* Fix broken tests

* get started

* nominally working generate res w/ search

* small refactors

* aint pretty but fully functional

* hacky if more functional

* more hack

* tools

* functional if not pretty

* Add processing

* working tool calling

* making progress

* keepin on

* Clean config

* working e2e

* update model version

* Remove no longer used stuff

* decouple search results for references and whats shown to model

* fix scripts build errs

* fix broken tests

* update default ref links

* fix broken tests

* Apply suggestions from code review

Co-authored-by: Nick Larew <[email protected]>

* revert default reference links

* adding missing test

---------

Co-authored-by: Ben Perlmutter <[email protected]>
Co-authored-by: Nick Larew <[email protected]>
* refactor GenerateRespose

* Clean up imports

* consolidate generate user prompt to the legacy file

* update test config imports

* Fix broken tests

* get started

* nominally working generate res w/ search

* small refactors

* aint pretty but fully functional

* hacky if more functional

* more hack

* tools

* functional if not pretty

* Add processing

* working tool calling

* making progress

* keepin on

* Clean config

* working e2e

* update model version

* Remove no longer used stuff

* decouple search results for references and whats shown to model

* fix scripts build errs

* remove ChatLlm

* lite fixes

* Remove stub

---------

Co-authored-by: Ben Perlmutter <[email protected]>
* refactor GenerateRespose

* Clean up imports

* consolidate generate user prompt to the legacy file

* update test config imports

* Fix broken tests

* get started

* nominally working generate res w/ search

* small refactors

* aint pretty but fully functional

* hacky if more functional

* more hack

* tools

* functional if not pretty

* Add processing

* working tool calling

* making progress

* keepin on

* Clean config

* working e2e

* update model version

* Remove no longer used stuff

* decouple search results for references and whats shown to model

* fix scripts build errs

* fix broken tests

* deprecation

* build out docs following last week convo

* clean up spec + contact

* fix merge funk

* docs updates

---------

Co-authored-by: Ben Perlmutter <[email protected]>
* update to fix broken test

* Update packages/ingest-mongodb-public/src/sources/snooty/snootyAstToOpenApiSpec.ts

---------

Co-authored-by: Ben Perlmutter <[email protected]>
* refactor GenerateRespose

* Clean up imports

* consolidate generate user prompt to the legacy file

* update test config imports

* Fix broken tests

* get started

* nominally working generate res w/ search

* small refactors

* aint pretty but fully functional

* hacky if more functional

* more hack

* tools

* functional if not pretty

* Add processing

* working tool calling

* making progress

* keepin on

* Clean config

* working e2e

* update model version

* Remove no longer used stuff

* decouple search results for references and whats shown to model

* fix scripts build errs

* fix broken tests

* update default ref links

* fix broken tests

* input guardrail refactor

* guardrail works well

* simpler validity metric

* add guardrail to server

* add next step todo

* llm refusal msg

* remove TODO comment

* merge fix

* fix unnec changes

* NL feedback

---------

Co-authored-by: Ben Perlmutter <[email protected]>
@mongodben mongodben changed the base branch from main to retrieval_tool_call June 11, 2025 15:21
@mongodben mongodben changed the base branch from retrieval_tool_call to EAI-991 June 11, 2025 15:21
Base automatically changed from EAI-991 to retrieval_tool_call June 11, 2025 17:03
Base automatically changed from retrieval_tool_call to main June 11, 2025 18:43
@@ -103,6 +104,13 @@ export function makeMongoDbConversationsService(
return conversation;
},

async findByMessageId({ messageId }: FindByMessageIdParams) {
const conversation = await conversationsCollection.findOne({
"messages.id": messageId,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

@mongodben mongodben Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per conversation last friday, we will want to move this to a new router for api/v1/respones, rather than current api/v1/conversations/responses

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.

2 participants