-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/msa-ez/platform
- Loading branch information
Showing
8 changed files
with
91 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../modeling/generators/es-generators/ESValueSummaryGenerator/ESValueSummaryGeneratorTest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const ESValueSummaryGenerator = require("./ESValueSummaryGenerator") | ||
const { libraryEsValue } = require("./mocks"); | ||
const { ESValueSummarizeWithFilter } = require("../helpers") | ||
const ESAliasTransManager = require("../../es-ddl-generators/modules/ESAliasTransManager") | ||
const { TokenCounter } = require("../../utils") | ||
|
||
class ESValueSummaryGeneratorTest { | ||
static async test(esValue=null) { | ||
if(!esValue) esValue = JSON.parse(JSON.stringify(libraryEsValue)); | ||
|
||
const esAliasTransManager = new ESAliasTransManager(esValue) | ||
|
||
|
||
const summariezedESValue = ESValueSummarizeWithFilter.getSummarizedESValue( | ||
esValue, [], esAliasTransManager | ||
) | ||
console.log(summariezedESValue) | ||
console.log("[*] 전체 ESValue 토큰 수 :", TokenCounter.getTokenCount(JSON.stringify(summariezedESValue), "gpt-4o")) | ||
|
||
|
||
const summary = await ESValueSummaryGenerator.getSummarizedESValueWithMaxTokenSummarize( | ||
"도서 관련 커맨드 생성 작업을 수행해야 함", | ||
esValue, | ||
[], | ||
800, | ||
"gpt-4o", | ||
esAliasTransManager | ||
) | ||
console.log("[*] 요약된 ESValue :", summary) | ||
console.log("[*] 요약된 ESValue 토큰 수 :", TokenCounter.getTokenCount(JSON.stringify(summary), "gpt-4o")) | ||
} | ||
} | ||
|
||
module.exports = ESValueSummaryGeneratorTest; |
41 changes: 0 additions & 41 deletions
41
src/components/designer/modeling/generators/es-generators/ESValueSummaryGenerator/tests.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.