Comments (2)
How do I use this?
Do I have to save a new file after your code?
Thank you.
from gpt4all.
My current fix.
`import json
Replace with your input and output file paths
input_file_path = "data.jsonl"
output_file_path = "new_data.jsonl"
with open(input_file_path, "r") as input_file, open(output_file_path, "w") as output_file:
for line in input_file:
# Load the JSON object from the line
json_obj = json.loads(line.strip())
# Check if the prompt is not an empty string
if json_obj["prompt"]:
# Write the JSON object to the output file
output_file.write(json.dumps(json_obj) + "\n")
`
from gpt4all.
Related Issues (20)
- [Feature] Support for GPT 4 Turbo
- UI: If you have too many installed models, the list gets cut off and can't be scrolled
- [Feature] Ctrl+F to search text inside a discussion
- bug
- v2.7.5 Windows Local and Server Model both use Llama 3 Instruct, program crash HOT 1
- [Feature] indicate the max context size of each model in the download list ?
- [Feature] check the compatibility of a hugging face model before fully downloading it ?
- Idk what this is honestly HOT 1
- Python Bindings: Model no longer kept in cache HOT 2
- Reliable crash test in 2.7.5 and 2.8.0pre1 HOT 3
- Python bindings: add possibility to clear history of a chat_session HOT 4
- "availableGPUDevices: built without Kompute" error when installed via pip on macOS M2 HOT 2
- [Feature] Ability to populate previous chat history when using chat_session() HOT 7
- 增加对Intel ARC A770显卡推理支持 HOT 2
- Ver. 2.7.4 nad Ver. 2.8.0 pre not starting gui on Windows HOT 2
- API service response data missing
- Building GPT4all from source - Windows - Qt.dll errors HOT 11
- Is there a WebUI available? HOT 1
- Need `#include <algorithm>` to build `gpt4all-backend/llamamodel.cpp`
- Windows 11. Nothing happens HOT 7
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 gpt4all.