-
Notifications
You must be signed in to change notification settings - Fork 30
feat: Convert LangChain implementation to new AIProvider interface #942
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
transform: { '^.+\\.ts?$': 'ts-jest' }, | ||
testMatch: ['**/__tests__/**/*test.ts?(x)'], | ||
testEnvironment: 'node', | ||
roots: ['<rootDir>/src'], | ||
testMatch: ['**/__tests__/**/*.test.ts'], | ||
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts'], | ||
coverageDirectory: 'coverage', | ||
coverageReporters: ['text', 'lcov', 'html'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], | ||
collectCoverageFrom: ['src/**/*.ts'], | ||
}; |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,4 @@ | |
* @packageDocumentation | ||
*/ | ||
|
||
export * from './LangChainTrackedChat'; | ||
export * from './LangChainProvider'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": ["src/**/*", "**/*.test.ts", "**/*.spec.ts"] | ||
"include": ["/**/*.ts"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: ESLint Include Pattern Uses Absolute PathThe |
||
"exclude": ["node_modules"] | ||
} |
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.
Just a thought: should this be
promptTokens + completionTokens
instead? I don't know iftotalTokens
would ever be different than prompt+completion, but if it ever was I could see users being confusedThere 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 am trying to find the conversation where this came up before. I believe @kinyoklion mentioned it. We used total tokens because it is possible some models may use additional tokens not accounted for in just the prompt / completion tokens.
Uh oh!
There was an error while loading. Please reload this page.
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, that is the thought. We originally didn't know that prompt + completion = total would be a guarantee. Which seems more likely if we eventually care about thinking tokens.
For example total may become prompt + thinking + completion in which case our total would be incorrect if it was just prompt + token.
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.
Though some providers currently aren't charging for thinking so they are excluding it from their total calculation. But I could see it change either way.