Skip to content

Commit

Permalink
patch v0.1.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Phicks-debug committed Nov 10, 2024
1 parent 3a51ded commit b6f9bd8
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 22 deletions.
11 changes: 4 additions & 7 deletions build/lib/bedrock_llm/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ async def generate_and_action_async(
prompt: Union[str, MessageBlock, List[MessageBlock]],
tools: List[str],
system: Optional[str] = None,
documents: Optional[str] = None,
config: Optional[ModelConfig] = None,
**kwargs: Any
) -> AsyncGenerator[Tuple[Optional[str], Optional[StopReason], Optional[MessageBlock], Optional[Union[List[ToolResultBlock], List[str], List[Dict]]]], None]:
Expand All @@ -136,7 +135,6 @@ async def generate_and_action_async(
prompt (Union[str, MessageBlock, List[MessageBlock]]): The input prompt or message(s).
tools (List[str]): List of tool names to be used.
system (Optional[str]): System message to be used in the conversation.
documents (Optional[str]): Any relevant documents to be included in the context.
config (Optional[ModelConfig]): Configuration for the model.
**kwargs: Additional keyword arguments to be passed to the generate_async method.
Expand All @@ -156,11 +154,10 @@ async def generate_and_action_async(

for _ in range(self.max_iterations):
async for token, stop_reason, response in super().generate_async(
self.memory,
system,
documents,
tool_metadata,
config,
prompt=self.memory,
system=system,
tools=tool_metadata,
config=config,
auto_update_memory=False,
**kwargs
):
Expand Down
3 changes: 0 additions & 3 deletions build/lib/bedrock_llm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ def generate(
- List[MessageBlock]: Conversation history as sequence of messages
system (Optional[str]): System instructions to control model behavior.
Applied at the beginning of the conversation. Defaults to None.
documents (Optional[str]): Additional context for the model's response,
typically used for RAG applications. Defaults to None.
tools (Optional[List[Dict[str, Any]], List[ToolMetadata]]): Function calling definitions that
the model can use. Each tool must include name, description, and
parameters schema. Defaults to None.
Expand Down Expand Up @@ -248,7 +246,6 @@ async def generate_async(
prompt (Union[str, MessageBlock, List[MessageBlock]]): The input prompt for the model.
Can be a string, single MessageBlock, or list of MessageBlocks.
system (Optional[str]): System message to guide model behavior. Defaults to None.
documents (Optional[str]): Reference documents for context. Defaults to None.
tools (Optional[List[Dict[str, Any]], List[ToolMetadata]]): List of tools available to the model. Defaults to None.
config (Optional[ModelConfig]): Controls model behavior with parameters like temperature,
max_tokens, top_p, etc. If None, uses default configuration. Defaults to None
Expand Down
Binary file removed dist/bedrock_llm-0.1.3.4-py3-none-any.whl
Binary file not shown.
Binary file removed dist/bedrock_llm-0.1.3.4.tar.gz
Binary file not shown.
Binary file added dist/bedrock_llm-0.1.3.5-py3-none-any.whl
Binary file not shown.
Binary file added dist/bedrock_llm-0.1.3.5.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="bedrock_llm",
version="0.1.3.4",
version="0.1.3.5",
packages=find_packages(where="src"),
package_dir={"": "src"},
install_requires=requirements,
Expand Down
2 changes: 1 addition & 1 deletion src/bedrock_llm.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: bedrock_llm
Version: 0.1.3.4
Version: 0.1.3.5
Summary: A Python LLM framework for interacting with AWS Bedrock services. Build on top of boto3 library. This library serves as an fast prototyping, building POC, production ready.
Home-page: https://github.com/Phicks-debug/bedrock_llm
Author: Tran Quy An
Expand Down
11 changes: 4 additions & 7 deletions src/bedrock_llm/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ async def generate_and_action_async(
prompt: Union[str, MessageBlock, List[MessageBlock]],
tools: List[str],
system: Optional[str] = None,
documents: Optional[str] = None,
config: Optional[ModelConfig] = None,
**kwargs: Any
) -> AsyncGenerator[Tuple[Optional[str], Optional[StopReason], Optional[MessageBlock], Optional[Union[List[ToolResultBlock], List[str], List[Dict]]]], None]:
Expand All @@ -136,7 +135,6 @@ async def generate_and_action_async(
prompt (Union[str, MessageBlock, List[MessageBlock]]): The input prompt or message(s).
tools (List[str]): List of tool names to be used.
system (Optional[str]): System message to be used in the conversation.
documents (Optional[str]): Any relevant documents to be included in the context.
config (Optional[ModelConfig]): Configuration for the model.
**kwargs: Additional keyword arguments to be passed to the generate_async method.
Expand All @@ -156,11 +154,10 @@ async def generate_and_action_async(

for _ in range(self.max_iterations):
async for token, stop_reason, response in super().generate_async(
self.memory,
system,
documents,
tool_metadata,
config,
prompt=self.memory,
system=system,
tools=tool_metadata,
config=config,
auto_update_memory=False,
**kwargs
):
Expand Down
3 changes: 0 additions & 3 deletions src/bedrock_llm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ def generate(
- List[MessageBlock]: Conversation history as sequence of messages
system (Optional[str]): System instructions to control model behavior.
Applied at the beginning of the conversation. Defaults to None.
documents (Optional[str]): Additional context for the model's response,
typically used for RAG applications. Defaults to None.
tools (Optional[List[Dict[str, Any]], List[ToolMetadata]]): Function calling definitions that
the model can use. Each tool must include name, description, and
parameters schema. Defaults to None.
Expand Down Expand Up @@ -248,7 +246,6 @@ async def generate_async(
prompt (Union[str, MessageBlock, List[MessageBlock]]): The input prompt for the model.
Can be a string, single MessageBlock, or list of MessageBlocks.
system (Optional[str]): System message to guide model behavior. Defaults to None.
documents (Optional[str]): Reference documents for context. Defaults to None.
tools (Optional[List[Dict[str, Any]], List[ToolMetadata]]): List of tools available to the model. Defaults to None.
config (Optional[ModelConfig]): Controls model behavior with parameters like temperature,
max_tokens, top_p, etc. If None, uses default configuration. Defaults to None
Expand Down

0 comments on commit b6f9bd8

Please sign in to comment.