You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fromlangchain.llmsimportOpenAIfromlangchain.promptsimportPromptTemplatefromlangchain.chainsimportLLMChainimportlogikon# Configure logikon debuggerconfig=logikon.DebugConfig(report_to=your_mlops_platforms)
lgk_handler=logikon.CallbackHandler(config=config)
# Set up chain and register debuggerllm=OpenAI()
prompt=PromptTemplate(
input_variables=["question"],
template="{question} Reason carefully before submitting your choice.",
)
chain=LLMChain(llm=llm, prompt=prompt, callbacks=[lgk_handler])
# Run chainprint(chain.run("Vim or Emacs?", callbacks=[lgk_handler]))
The text was updated successfully, but these errors were encountered:
Callback for langchain (for example):
The text was updated successfully, but these errors were encountered: