Skip to content

Commit

Permalink
fix: write log
Browse files Browse the repository at this point in the history
  • Loading branch information
glorenzo972 committed Jul 31, 2024
1 parent 07ef7fa commit 6be4f91
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 30 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
*Andrea Sponziello*
### **Copyrigth**: *Tiledesk SRL*

## [2024-07-31]
### 0.2.10
- fix: write log
- updated: version of libs


## [2024-07-29]
### 0.2.9
- add: n_messages on /api/ask to set the maximum number of messages to include
Expand Down
51 changes: 26 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "tilellm"
version = "0.2.9"
version = "0.2.10"
description = "tiledesk for RAG"
authors = ["Gianluca Lorenzo <[email protected]>"]
repository = "https://github.com/Tiledesk/tiledesk-llm"
Expand All @@ -13,37 +13,38 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry.dependencies]
python = "^3.10"
fastapi = "^0.110.0"
jsonschema= "^4.22.0"
fastapi = "0.111.1"
jsonschema= "4.23.0"
redis= "^5.0.7"
aioredis= "^2.0.1"
aioredis= "2.0.1"
#redismutex = "^1.0.0"
langchain = "^0.2.6"
jq = "^1.7.0"
openai = "^1.35.7"
langchain_openai = "0.1.x"
langchain = "0.2.11"
jq = "1.7.0"
openai = "1.37.1"
langchain-openai = "0.1.19"
langchain-voyageai = "0.1.1"
langchain-anthropic = "0.1.16"
langchain-cohere="0.1.8"
langchain-google-genai= "1.0.7"
langchain-groq ="0.1.6"
langchain-aws="0.1.8"
pinecone-client = "^4.1.1"
python-dotenv = "^1.0.1"
langchain_community = "0.2.x"
tiktoken = "0.7.x"
beautifulsoup4 = "^4.12.3"
langchain-anthropic = "0.1.21"
langchain-cohere= "0.1.9"
langchain-google-genai= "1.0.8"
langchain-groq = "0.1.8"
langchain-aws= "0.1.12"
pinecone-client = "5.0.0"
python-dotenv = "1.0.1"
langchain-community = "0.2.10"
tiktoken = "0.7.0"
beautifulsoup4 = "4.12.3"
#uvicorn = "^0.28"
unstructured= "0.15.0"
playwright = "1.45.1"
pypdf="^4.2.0"
docx2txt="^0.8"
wikipedia="^1.4.0"
html2text="2024.2.26"
psutil="^6.0.0"
pypdf= "4.3.1"
docx2txt= "0.8"
wikipedia= "1.4.0"
html2text= "2024.2.26"
psutil= "6.0.0"


[tool.poetry.dependencies.uvicorn]
version = "^0.28"
version = "0.30.3"
extras = ["standard"]
# Add other dependencies here as needed
#[tool.poetry.dependencies.unstructured]
Expand All @@ -54,7 +55,7 @@ extras = ["standard"]
#uvicorn = "^0.28" # For development server

[tool.poetry.dev-dependencies.uvicorn]
version = "^0.28"
version = "0.30.3"
extras = ["standard"]

[tool.poetry.scripts]
Expand Down
3 changes: 2 additions & 1 deletion tilellm/controller/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ def get_session_history(session_id: str) -> BaseChatMessageHistory:
source = " ".join(sources)
metadata_id = ids[0]

logger.info(result)
#logger.info(result)
#print(result['answer'])

result['answer'], success = verify_answer(result['answer'])

Expand Down
14 changes: 10 additions & 4 deletions tilellm/shared/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,18 @@
just reformulate it if needed and otherwise return it as is."""

qa_system_prompt = """You are an helpful assistant for question-answering tasks. \
Use ONLY the following pieces of retrieved context to answer the question. \
If you don't know the answer, just say that you don't know. \
If none of the retrieved context answer the question, add this word to the end <NOANS> \
Use ONLY the pieces of retrieved context delimited by #### to answer the question. \
The first step is to extrac relevant information to the question from retrieved context.
If you don't know the answer, just say that you don't know. \
Respond with "No relevant information were found <NOANS>" if no relevant information were found.
{context}"""
####
{context}
####
"""


def populate_constant():
Expand Down

0 comments on commit 6be4f91

Please sign in to comment.