Skip to content

Commit

Permalink
fixed add new row issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pradeep Gudipati committed Apr 22, 2024
1 parent 5e539e0 commit 55a809e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,3 +132,4 @@ cython_debug/
*.jsonl
*.csv
*.ann
/chroma_db
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ This python code converts the jsonl data to a sqllite database with a table call
The messages table has 3 rows

1. id - Primary key
2. User - Contains the Question
3. Assistant - Contains the answer to the Question
2. Question - Contains the Question
3. Answer - Contains the answer to the Question

### 2. DB to JSONL
- SQLite to JSONL Converter code - [db_to_jsonl.py](jsonl_data_to_db%2Fdb_to_jsonl.py)
Expand Down
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def add_new_qa():
:return: response
"""
data = request.json
new_item = LLMDataModel(user=data["question"], assistant=data["answer"])
new_item = LLMDataModel(question=data["question"], answer=data["answer"])
db.session.add(new_item)
db.session.commit()
return jsonify(status="success", message=f"New item added."), 200
Expand Down

0 comments on commit 55a809e

Please sign in to comment.