mirror of
https://github.com/ddworken/hishtory.git
synced 2025-05-31 07:26:53 +02:00
Set OPENAI_API_KEY for testTui/ai so that it runs with the hishtory server rather than via directly querying OpenAI
This commit is contained in:
parent
dd6cf710c7
commit
aeadaf4e0d
@ -1923,6 +1923,8 @@ func testTui_errors(t *testing.T) {
|
||||
func testTui_ai(t *testing.T) {
|
||||
// Setup
|
||||
defer testutils.BackupAndRestore(t)()
|
||||
defer testutils.BackupAndRestoreEnv("OPENAI_API_KEY")()
|
||||
os.Setenv("OPENAI_API_KEY", "")
|
||||
tester, _, _ := setupTestTui(t, Online)
|
||||
req, err := json.Marshal(
|
||||
ai.TestOnlyOverrideAiSuggestionRequest{Query: "myQuery", Suggestions: []string{"result 1", "result 2", "longer result 3"}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user