From a180bb58a2270b5e23af77289a49ddd1f74bc60b Mon Sep 17 00:00:00 2001 From: "David J. Bianco" Date: Fri, 23 Aug 2024 11:18:14 -0400 Subject: [PATCH] Minor code formatting changes --- ssh_server.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ssh_server.py b/ssh_server.py index 2b73141..e426b80 100644 --- a/ssh_server.py +++ b/ssh_server.py @@ -1,6 +1,4 @@ -# To run this program, the file ``ssh_host_key`` must exist with an SSH -# private key in it to use as a server host key. An SSH host certificate -# can optionally be provided in the file ``ssh_host_key-cert.pub``. +#!/usr/bin/env python3 import asyncio import asyncssh @@ -17,10 +15,7 @@ from langchain_aws import ChatBedrock, ChatBedrockConverse from langchain_google_genai import ChatGoogleGenerativeAI from langchain_core.messages import HumanMessage -from langchain_core.chat_history import ( - BaseChatMessageHistory, - InMemoryChatMessageHistory, -) +from langchain_core.chat_history import BaseChatMessageHistory, InMemoryChatMessageHistory from langchain_core.runnables.history import RunnableWithMessageHistory from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder from langchain_core.messages import SystemMessage, trim_messages @@ -30,6 +25,8 @@ from operator import itemgetter from configparser import ConfigParser + + async def handle_client(process: asyncssh.SSHServerProcess) -> None: # This is the main loop for handling SSH client connections. # Any user interaction should be done here.