Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.0.2 #6

Merged
merged 5 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langserve"
version = "0.0.1"
version = "0.0.2"
description = ""
readme = "README.md"
authors = ["LangChain"]
Expand All @@ -14,7 +14,7 @@ fastapi = {version = ">0.90.1", optional = true}
sse-starlette = {version = "^1.3.0", optional = true}
httpx-sse = {version = "^0.3.1", optional = true}
pydantic = "^1"
langchain = { git = "https://github.com/langchain-ai/langchain", subdirectory = "libs/langchain" }
langchain = ">=0.0.305"

[tool.poetry.group.dev.dependencies]
jupyterlab = "^3.6.1"
Expand Down
87 changes: 39 additions & 48 deletions tests/unit_tests/test_encoders.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pytest
from langchain.schema.messages import (
HumanMessage,
HumanMessageChunk,
SystemMessage,
)

Expand Down Expand Up @@ -33,7 +32,6 @@
"additional_kwargs": {},
"type": "human",
"example": False,
"is_chunk": False,
}
]
},
Expand All @@ -46,7 +44,6 @@
"content": "Hello",
"example": False,
"type": "human",
"is_chunk": False,
},
),
# Test with a list containing mixed elements
Expand All @@ -58,60 +55,55 @@
"content": "Hello",
"example": False,
"type": "human",
"is_chunk": False,
},
{
"additional_kwargs": {},
"content": "Hi",
"type": "system",
"is_chunk": False,
},
42,
"world",
],
),
# Attention: This test is not correct right now
# Test with full and chunk messages
(
[HumanMessage(content="Hello"), HumanMessageChunk(content="Hi")],
[
{
"additional_kwargs": {},
"content": "Hello",
"example": False,
"type": "human",
"is_chunk": False,
},
{
"additional_kwargs": {},
"content": "Hi",
"example": False,
"type": "human",
"is_chunk": True,
},
],
),
# Attention: This test is not correct right now
# Test with full and chunk messages
(
[HumanMessageChunk(content="Hello"), HumanMessage(content="Hi")],
[
{
"additional_kwargs": {},
"content": "Hello",
"example": False,
"type": "human",
"is_chunk": True,
},
{
"additional_kwargs": {},
"content": "Hi",
"example": False,
"type": "human",
"is_chunk": False,
},
],
),
# Uncomment when langchain 0.0.306 is released
# # Attention: This test is not correct right now
# # Test with full and chunk messages
# (
# [HumanMessage(content="Hello"), HumanMessageChunk(content="Hi")],
# [
# {
# "additional_kwargs": {},
# "content": "Hello",
# "example": False,
# "type": "human",
# },
# {
# "additional_kwargs": {},
# "content": "Hi",
# "example": False,
# "type": "human",
# },
# ],
# ),
# # Attention: This test is not correct right now
# # Test with full and chunk messages
# (
# [HumanMessageChunk(content="Hello"), HumanMessage(content="Hi")],
# [
# {
# "additional_kwargs": {},
# "content": "Hello",
# "example": False,
# "type": "human",
# },
# {
# "additional_kwargs": {},
# "content": "Hi",
# "example": False,
# "type": "human",
# },
# ],
# ),
# Test with a dictionary containing mixed elements
(
{
Expand All @@ -125,7 +117,6 @@
"content": "Greetings",
"example": False,
"type": "human",
"is_chunk": False,
},
"numbers": [1, 2, 3],
"boom": "Hello, world!",
Expand Down