-
Notifications
You must be signed in to change notification settings - Fork 64
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
Support /exports
from mongodb-rag-core
#548
Conversation
@@ -15,14 +16,14 @@ export const makeRadiantChatLlm = async ({ | |||
deployment: string; | |||
mongoDbAuthCookie?: string; | |||
lmmConfigOptions: Pick< | |||
OpenAI.default.Chat.ChatCompletionCreateParams, | |||
OpenAI.Chat.ChatCompletionCreateParams, |
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 dislike the namespaced types here (very explicit what it is!). Is it possible to import just ChatCompletionCreateParams
without the whole OpenAI
namespace?
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 dont think so. dont think it's a real issue tho b/c the benchmarks package is only being built in this repo, which will already install all of mongodb-rag-core
, which is dependent on the openai
package
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.
LGTM % a few questions throughout
packages/chatbot-server-mongodb-public/src/processors/makeStepBackUserQuery.test.ts
Show resolved
Hide resolved
packages/chatbot-server-mongodb-public/src/processors/userMessageMongoDbGuardrail.test.ts
Show resolved
Hide resolved
@@ -1,33 +1,29 @@ | |||
export const makeMockOpenAIToolCall = (funcRes: Record<string, unknown>) => { | |||
// This module is also required for the mock to work | |||
// in the tests | |||
const { updateFrontMatter } = jest.requireActual("mongodb-chatbot-server"); |
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.
No longer required? Should we delete the comment above it too?
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.
def delete comment too. will implement
// LLM function | ||
const translator = createJsonTranslator<SchemaType>( | ||
model, | ||
const validator = createTypeScriptJsonValidator<SchemaType>( |
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.
Why update our TypeChat code? Is there a new version?
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.
yeah
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 see a version bump in the diff - do we need to update scripts/package.json
?
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.
maybe? i'll set the version in package.json to whatever is most recent
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.
version in package.json is the latest. i'm confused what's going on, but will keep as is since it works and i dont think this usage is important enough for us to worry too much about
"module": "NodeNext", | ||
"moduleResolution": "NodeNext", |
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.
There are some considerable implications in changing the module format. I think this is something we should do, but we'll want to monitor for impact + maybe do a major version bump
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 think the main implication of switching to NodeNext
is that now it supports both common js and esm by default rather than just commonjs.
Jira: n/a
Changes
/exports
. To make this work, I had to add the following to the roottsconfig.json
:/export
mongodb-rag-core
packagechatbot-eval-mongodb-public
(it's unused)mongodb-chatbot-evaluation
b/c it has some modules used in benchmarks. we should remove that and move the modules over in a separate PR.Notes