Skip to content

Commit

Permalink
fix: system message
Browse files Browse the repository at this point in the history
  • Loading branch information
patel-lyzr committed Apr 28, 2024
1 parent f849c59 commit a3325f5
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 26 deletions.
30 changes: 18 additions & 12 deletions build/lib/lyzr/utils/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ def pdf_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -167,11 +168,12 @@ def txt_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -246,11 +248,12 @@ def docx_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -315,11 +318,12 @@ def webpage_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -384,11 +388,12 @@ def website_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -453,11 +458,12 @@ def youtube_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down
Binary file removed dist/lyzr-0.1.37.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/lyzr-0.1.38.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion lyzr.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: lyzr
Version: 0.1.37
Version: 0.1.38
Summary: UNKNOWN
Home-page: UNKNOWN
Author: lyzr
Expand Down
30 changes: 18 additions & 12 deletions lyzr/utils/chat_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,12 @@ def pdf_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -167,11 +168,12 @@ def txt_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -246,11 +248,12 @@ def docx_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -315,11 +318,12 @@ def webpage_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -384,11 +388,12 @@ def website_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down Expand Up @@ -453,11 +458,12 @@ def youtube_chat_(

memory = ChatMemoryBuffer.from_defaults(token_limit=4000)

chat_engine = ContextChatEngine(
chat_engine = ContextChatEngine.from_defaults(
llm=llm,
memory=memory,
system_prompt=system_prompt,
service_context=service_context,
retriever=retriever,
prefix_messages=list(),
**chat_engine_params,
)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="lyzr",
version="0.1.37",
version="0.1.38",
author="lyzr",
description="",
long_description=open("README.md").read(),
Expand Down

0 comments on commit a3325f5

Please sign in to comment.