Comments (8)
I appreciate your suggestion, but I have decided to stick with JDK 17 because I value the future more.
from langchain-java.
JDK 17 provides many new syntax features, especially the text blocks functionality. I use it to write prompts; otherwise, Java 8 string concatenation would be a nightmare for me.
![image](https://private-user-images.githubusercontent.com/97529774/258271843-c197aa87-05f7-4251-9ad6-fe1b22a8a21f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMTA3MzgsIm5iZiI6MTcyMzIxMDQzOCwicGF0aCI6Ii85NzUyOTc3NC8yNTgyNzE4NDMtYzE5N2FhODctMDVmNy00MjUxLTlhZDYtZmUxYjIyYThhMjFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDEzMzM1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJjODU3NDk0NDk2ODYyMTQ0ZTgzOWI2MTVlZTRkODAxYjIxODBiMmJlNzc4OWVlYmYwNzEyYzdiZmU5NDYwMTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.xpxKqa0u4kNBB4Z80v2PB_awCm7gX4XQD2et64cNvwE)
from langchain-java.
I think that in many enterprise scenarios, JDK8 still holds a significant share. As I work on banking systems, I consider that the main systems in this field are JDK8-based. If langchain-java can maintain compatibility with JDK8, it would be easier to gain practical application scenarios.
u can try this prompt, it works well for me.
role: "system",
content: `
You are a senior JAVA engineer who is very familiar with the syntax differences between JDK17 and JDK8,
and can proficiently convert code between the two.
Please convert the following JDK17 code into JDK8 code.
Do not provide suggestions, just convert the code.
Remember to enclose the converted code in a code block with the md format.
In handling multi-line strings, preserve the original formatting:
`
from langchain-java.
You can integrate Scala with Java 8.
val speech = """Four score and
|seven years ago""".stripMargin
https://www.oreilly.com/library/view/scala-cookbook/9781449340292/ch01s03.html
from langchain-java.
Many enterprises are currently using JDK 8 in their production scenarios.
Using a higher version of JDK may limit the usage scenarios.
I suggest downgrading to JDK 8.
Hi, Did you manage to get the code working with JDK8 ? if so what changes did you make to have it build.
from langchain-java.
from langchain-java.
Yes, I am using this project under JDK8, with the main modifications focusing on JDK17's strings and a few features. My approach is to directly compile this project with JDK8, and use GPT to resolve any errors that arise. my prompt is : You are a senior JAVA engineer who is very familiar with the syntax differences between JDK17 and JDK8, and can proficiently convert code between the two. Please convert the following JDK17 code into JDK8 code. Do not provide suggestions, just convert the code. Remember to enclose the converted code in a code block with the md format. In handling multi-line strings, preserve the original formatting: It works well for me. For more details, you can refer to my previous email.
…
2023年10月2日 21:37,leonaemsears @.***> 写道: Many enterprises are currently using JDK 8 in their production scenarios. Using a higher version of JDK may limit the usage scenarios. I suggest downgrading to JDK 8. Hi, Did you manage to get the code working with JDK8 ? if so what changes did you make to have it build. — Reply to this email directly, view it on GitHub <#65 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWRVRPCVYIBLZXVTBRLPWFTX5K7TLAVCNFSM6AAAAAA3CZCKMSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTGAZTIMBVGY. You are receiving this because you authored the thread.
Good prompt,Great Job!
from langchain-java.
@wangmiao-1981 I've created a JDK8 branch to support Java 8. Would you be willing to contribute your code? Let's learn and work together.
Currently, @Jashinck is contributing to the JDK8 branch, but it's still in progress. We can maintain Java 8 together.
https://github.com/HamaWhiteGG/langchain-java/tree/jdk8
from langchain-java.
Related Issues (20)
- 是否有function call的案例? HOT 1
- [Feature] Support GoogleSearchAPIWrapper
- Integrating with Jlama for local inferences
- 在 Pinecone 中使用了从Collections中恢复的索引发生异常 HOT 4
- 请问支持接入本地开源模型吗?比如Baichuan-7b、ChatGLM-6b、ChatGLM2-6b等 HOT 4
- ChatGLMExample 测试报错 HOT 5
- ZeroShotAgent与ChatAgent的 fromLlmAndTools方法名错误 HOT 1
- Dependency convergence errors when adding langchain-java as a Maven dependency HOT 1
- Stream is not work. HOT 3
- [Feature][openai-client] Supports functions
- [Feature][langchain-core] Supports functions HOT 1
- [BUG] Incorrect Type for logprobs Field in CompletionResp Class HOT 4
- [Feature][openai-client] Support Images
- Google Gemini support
- support Domestic large model
- Mock client api call in Unit test Using Junit framework to avoid calling the actual service
- Default model text-davinci-003 is deprecated and need to be replaced
- Why do it need the loadTools function?
- "Question" appearing in the SQLQuery using Ollama
- java.lang.UnsatisfiedLinkError: no jnind4jcpu in java.library.path:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from langchain-java.