Mysterious Langchain Azure OpenAI Problems

I was banging my head on this problem for hours. Using langchain and our Azure OpenAI model, I kept getting a Value error: As of openai>=1.0.0, Azure endpoints should be specified via the `azure_endpoint` param not `openai_api_base` (or alias `base_url`). I was not defining openai_api_base anywhere in my code. LLMs were no use but I did find the suggestion on Reddit to check if openai_api_base was an environment variable. Sure enough, I had defined that months ago, never used it, and forgot it. Deleted the variable and problem solved. ...

November 8, 2024

LLM-assisted Active Directory Search

I needed to check Active Directory (AD) to see who was part of a group. I use AD infrequently and keep a list of queries in a text file on my desktop, as I can’t ever remember the syntax. As I opened my list I thought…wait, I don’t ever have to do this again. Let’s write a program to take a natural language prompt and have our LLM figure out the PowerShell commands. Within 30 minutes I had a functional program. It took several small iterations and these are the prompts I used. Unfortunately, I can’t share the program. ...

September 27, 2024

I was going to write a post but ...

Simon Willison beat me to it. This sums up my experience coding with LLMs. I love it. For a brief amount of time I worried about it making me a lazy programmer but it isn’t. Asking the LLM about the code it writes is a far better way to learn than copying code out of a book and hoping the author could explain it.

September 24, 2024