Skip to content

Commit 99172a8

Browse files
authored
Merge pull request #257 from satti-hari-krishna-reddy/support-llm
Support llm
2 parents 12455a9 + 97d7011 commit 99172a8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ai.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10667,8 +10667,12 @@ func HandleEditWorkflowWithLLM(resp http.ResponseWriter, request *http.Request)
1066710667
func runSupportLLMAssistant(ctx context.Context, input QueryInput) (string, string, error) {
1066810668

1066910669
apiKey := os.Getenv("OPENAI_API_KEY")
10670-
if apiKey == "" || assistantId == "" {
10671-
return "", "", errors.New("OPENAI_API_KEY and ASSISTANT_ID must be set")
10670+
if apiKey == "" || assistantId == "" || docsVectorStoreID == "" {
10671+
assistantId = os.Getenv("OPENAI_ASSISTANT_ID")
10672+
docsVectorStoreID = os.Getenv("OPENAI_DOCS_VS_ID")
10673+
if apiKey == "" || assistantId == "" || docsVectorStoreID == "" {
10674+
return "", "", errors.New("OPENAI_API_KEY, OPENAI_ASSISTANT_ID, and OPENAI_DOCS_VS_ID must be set")
10675+
}
1067210676
}
1067310677

1067410678
config := openai.DefaultConfig(apiKey)

0 commit comments

Comments
 (0)