Skip to content

Commit

Permalink
Release 0.0.2 (#6)
Browse files Browse the repository at this point in the history
Release 0.0.2
  • Loading branch information
eyurtsev committed Oct 1, 2023
1 parent 100c780 commit 18fb916
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 70 deletions.
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

0 comments on commit 18fb916

Please sign in to comment.