Commit Graph

7 Commits

Author SHA1 Message Date
Julien Dubois 9297f183c7
Improve the Judge0 code execution engine (#3216)
- Update the authentication mechanism to follow the current version of
the doc
- Added logs for common HTTP headers errors
- Added checks and a Builder, and ran spotless, to follow the usual
project's guidelines
- Updated to the newer (102) id for the JavaScript language
- Added a more complex test `should_execute_mathematical_calculations`
to check everything works correctly

---------

Co-authored-by: Alexey Titov <33568148+Heezer@users.noreply.github.com>
2025-06-17 12:36:43 +02:00
Konstantin Pavlov 9178367109
FIX BUILD: Fix code coverage and some improvements (#2010)
## Issue
Build was failing due to low test coverage after [this
change](https://github.com/langchain4j/langchain4j/pull/1987/files#diff-9a5519a26a4b6d2fd412c877de4459c2a119e793fece9385f558a93a7e0aee5aR273-R275).
The hotfix is to enable tracing for logger with mockStatic for in the
affected DefaultRetrievalAugmentorTest.

Other changes:

* **Refine integration test run conditions to exclude experimental
builds and require the presence of the `OPENAI_API_KEY` secret.**
* [Upgrade mockito
instrumentation](https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3)
(javaagent) setup to make it compatible with new JDKs
* Updated `pom.xml` to upgrade `jacoco-maven-plugin` version. 
* Enhanced `README.md` with additional badges for nightly build and
Codacy dashboard.
(`[README.mdL3-R6](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L3-R6)`)
* Introduced new tests for comparison filters
* Added tests for logical filters
* Added configuration for external dependencies in
`.idea/externalDependencies.xml` to include SonarLint and SpotBugs
plugins.

## General checklist
- [x] There are no breaking changes
- [x] I have added unit and integration tests for my change
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2024-10-31 16:34:05 +01:00
LangChain4j 3cf5561379 Judge0: migrate from Gson to Jackson (#1729) 2024-09-09 13:53:42 +02:00
hrhrng dd88b21bca
Judge0: migrate from Gson to Jackson (#1729)
## Issue
Closes #1691

## Change
Define a Json class in Judge0 which use Jackson and migrate all usages
in Judge0 package to it.
Generate getter and setter for Beans in Judge0 package to adapt Jackson.

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [X] There are no breaking changes
- [ ] I have added unit and integration tests for my change
- [X] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [X] I have manually run all the unit and integration tests in the
[core]
2024-09-09 13:34:16 +02:00
Mohamed AIT ABDERRAHMAN 2e5f993837
Rename judge0 engine package (#1136)
## Issue
Related to https://github.com/langchain4j/langchain4j/issues/1066


## Change
Move judge0 code execution engine package from `dev.langchain4j.code` to
`dev.langchain4j.code.judge0`


## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] There are no breaking changes
- [ ] I have added unit and integration tests for my change
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)


## Checklist for adding new model integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)


## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2024-05-22 08:28:04 +02:00
LangChain4j bc886d1e93 Extract Judge0 code execution engine as module 2024-05-21 08:50:11 +02:00
Mohamed AIT ABDERRAHMAN b27fd4d6ac
Extract Judge0 code execution engine as module (#1051)
## Issue
https://github.com/langchain4j/langchain4j/issues/1048

## Change
I extract these classes as new module
`langchain4j-code-execution-engine-judge0` :
- `Judge0JavaScriptEngine`
- `JavaScriptCodeFixer`
- `Judge0JavaScriptExecutionTool`
- `JavaScriptCodeFixerTest`

and I moved the `com.squareup.okhttp3:okhttp` dependency from the main
module to that new one.

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] There are no breaking changes
- [x] I have added unit and integration tests for my change
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [x] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [x] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)


## Checklist for adding new model integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [x] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)


## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2024-05-21 08:47:25 +02:00