https://www.boundaryml.com logo
🟡 Is BAML compatible with Langchain clients?
# questions
n
is BAML compatible with langchain clients?
v
Yep! BAMl LLM functions just turn into regular python functions so you can just use however you wrap python function with langchain
Let me know if you get stuck!
n
awesome, will test that out soon, thanks!
Finally got around to trying this. Do you know of any examples? The sense I get is you wrap the function in a tool call, but I was thinking more like I want to use a langchain client object as the client for a BAML function
what I'm trying to do is have the BAML function calls be routed through a langchain AzureChatOpenAI model
v
hey folks sorry for the delay here! been traveling 🥲
sadly its not very easy to compose in that way (i.e. using llm clients defined in BAML in langchain or vice-versa). Langchains runtime is much too closely tied to python and would break the "llm calls as functions" contraint BAML requires.
it would also make it hard to make the VSCode playground work!