-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(backend): optimization handler output content (#86)
before <img width="691" alt="image" src="https://github.com/user-attachments/assets/f2d3694e-ab06-4b37-a8b1-52225671a1c7" /> after <img width="535" alt="image" src="https://github.com/user-attachments/assets/58bd2822-b9f3-4554-8a92-7e54e5689a15" /> - updating chat api call with new chat api - remove embedding request in llm-server - optimization log prompt format for if log output is not only string <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit Based on the comprehensive summary of changes, here are the high-level release notes: - **Model Interaction Updates** - Updated chat model interaction to use a more structured message format. - Added support for system and assistant roles in message handling. - **Utility Function Enhancements** - Introduced new utility functions for processing model responses. - Improved content extraction and formatting methods, including the removal of code block fences. - **Configuration and Logging** - Enhanced configuration loading with additional logging for better visibility. - **Embedding and Provider Changes** - Removed embedding-related functionality and providers, simplifying the overall architecture. - **Minor Improvements** - Code formatting and readability enhancements. - Streamlined import statements and method signatures. These changes primarily focus on improving the robustness and flexibility of the model interaction and response processing mechanisms. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: NarwhalChen <[email protected]> Co-authored-by: ZHallen122 <[email protected]>
- Loading branch information
1 parent
f9b0ed5
commit f20ec64
Showing
33 changed files
with
1,204 additions
and
1,317 deletions.
There are no files selected for viewing
49 changes: 0 additions & 49 deletions
49
backend/src/build-system/__tests__/test-database-schemas.spec.ts
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
17 changes: 10 additions & 7 deletions
17
backend/src/build-system/__tests__/test.model-provider.spec.ts
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
import { EmbeddingProvider } from "src/common/embedding-provider"; | ||
import { EmbeddingProvider } from 'src/common/embedding-provider'; | ||
|
||
describe('Model Provider Test', () => { | ||
let embProvider = EmbeddingProvider.getInstance(); | ||
it('should generate a response from the model provider', async () => { | ||
let res = await embProvider.generateEmbResponse("Your text string goes here", "text-embedding-3-small"); | ||
console.log(res); | ||
}); | ||
}); | ||
const embProvider = EmbeddingProvider.getInstance(); | ||
it('should generate a response from the model provider', async () => { | ||
const res = await embProvider.generateEmbResponse( | ||
'Your text string goes here', | ||
'text-embedding-3-small', | ||
); | ||
console.log(res); | ||
}); | ||
}); |
Oops, something went wrong.