ricklamers / shell-ai

LangChain powered shell command generator and runner CLI
MIT License
1.02k stars 62 forks source link

config for Azure OpenAI #6

Closed borisdev closed 1 year ago

borisdev commented 1 year ago

Objective

Handle Azure OpenAI configs

Motivation

shai list all files
? Select a command:
❯ ls
  Generate new suggestions
  Dismiss

Result latency

Example Azure OpenAI config

{
  "OPENAI_API_TYPE": "azure",
  "OPENAI_API_KEY": "d19084f8878843218b77d101a76b5b42",
  "OPENAI_API_VERSION": "2023-05-15",
  "OPENAI_MODEL": "gpt-3.5-turbo",
  "SHAI_SUGGESTION_COUNT": "3",
  "AZURE_DEPLOYMENT_NAME": "test-whychain",
  "AZURE_API_BASE": "https://whychaintest.openai.azure.com/",
  "SHAI_SUGGESTION_COUNT": "3"
}

Twitter handle: @boris_dev

ricklamers commented 1 year ago

This looks good! Although I think we can also use the n param https://api.python.langchain.com/en/latest/chat_models/langchain.chat_models.azure_openai.AzureChatOpenAI.html

Could you make that change?

borisdev commented 1 year ago

This looks good! Although I think we can also use the n param https://api.python.langchain.com/en/latest/chat_models/langchain.chat_models.azure_openai.AzureChatOpenAI.html

Could you make that change?

Done!

ricklamers commented 1 year ago

Fantastic!