Human in the loop
Implémentation fonctionelle de l'HITL !
This commit is contained in:
@@ -5,11 +5,18 @@ from langchain.messages import HumanMessage, SystemMessage, AIMessage, ToolMessa
|
||||
import mlflow
|
||||
|
||||
from agent import getGraph
|
||||
from utils.InterruptPayload import InterruptPayload
|
||||
from utils.StreamGraph import streamGraph
|
||||
|
||||
# MLFLOW
|
||||
mlflow.set_experiment("TEST PROJET") # VOIR AVEC LA COMMANDE "MLFLOW SERVER"
|
||||
mlflow.langchain.autolog()
|
||||
|
||||
out_state = getGraph().invoke({'messages':[HumanMessage("Observe la base de documents, et génère un rapport de stage à partir de celle-ci. Ecris le dans un fichier markdown.")]})
|
||||
for message in out_state['messages']:
|
||||
message.pretty_print()
|
||||
initial_input = {
|
||||
'messages':[HumanMessage("Recherche 'Recette de Monster' sur internet")]
|
||||
}
|
||||
|
||||
config={"configurable": {"thread_id": 'yes'}}
|
||||
|
||||
# Et je lance !
|
||||
streamGraph(initial_input, config, getGraph())
|
||||
Reference in New Issue
Block a user