-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from Dogtiti/feature/web-search
Feature/web search
- Loading branch information
Showing
76 changed files
with
2,790 additions
and
785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,3 +47,7 @@ yarn-error.log* | |
/public/locales/$LOCALES | ||
|
||
.eslintcache | ||
|
||
# Sentry Auth Token | ||
.sentryclirc | ||
/volumes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Import the createModel function | ||
import { GPT_35_TURBO } from "../src/utils/constants"; | ||
import { createModel } from "../src/utils/prompts"; | ||
|
||
describe("createModel", () => { | ||
test("should use custom settings when API key is provided", () => { | ||
const customSettings = { | ||
customApiKey: "test_api_key", | ||
customTemperature: 0.222, | ||
customModelName: "Custom_Model", | ||
customMaxTokens: 1234, | ||
}; | ||
|
||
const model = createModel(customSettings); | ||
|
||
expect(model.temperature).toBe(customSettings.customTemperature); | ||
expect(model.modelName).toBe(customSettings.customModelName); | ||
expect(model.maxTokens).toBe(customSettings.customMaxTokens); | ||
}); | ||
|
||
test("should use default settings when API key is not provided", () => { | ||
const customSettings = { | ||
customTemperature: 0.222, | ||
customModelName: "Custom_Model", | ||
customMaxTokens: 1234, | ||
}; | ||
|
||
const model = createModel(customSettings); | ||
|
||
expect(model.temperature).toBe(0.9); | ||
expect(model.modelName).toBe(GPT_35_TURBO); | ||
expect(model.maxTokens).toBe(400); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { removeTaskPrefix } from "../src/utils/helpers"; | ||
|
||
describe("removeTaskPrefix", () => { | ||
test('removes "Task: "', () => { | ||
const input = "Task: This is a sample task"; | ||
const output = removeTaskPrefix(input); | ||
expect(output).toBe("This is a sample task"); | ||
}); | ||
|
||
test('removes "Task {N}: "', () => { | ||
const input = | ||
"Task 1: Perform a comprehensive analysis of the current system's performance."; | ||
const output = removeTaskPrefix(input); | ||
expect(output).toBe( | ||
"Perform a comprehensive analysis of the current system's performance." | ||
); | ||
}); | ||
|
||
test('removes "Task {N}. "', () => { | ||
const input = "Task 2. Create a python script"; | ||
const output = removeTaskPrefix(input); | ||
expect(output).toBe("Create a python script"); | ||
}); | ||
|
||
test('removes "{N} - "', () => { | ||
const input = "5 - This is a sample task"; | ||
const output = removeTaskPrefix(input); | ||
expect(output).toBe("This is a sample task"); | ||
}); | ||
|
||
test('removes "{N}: "', () => { | ||
const input = "2: This is a sample task"; | ||
const output = removeTaskPrefix(input); | ||
expect(output).toBe("This is a sample task"); | ||
}); | ||
|
||
test("does not modify strings without matching prefixes", () => { | ||
const input = "This is a sample task without a prefix"; | ||
const output = removeTaskPrefix(input); | ||
expect(output).toBe(input); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ services: | |
volumes: | ||
- .env.docker:/app/.env | ||
- ./db:/app/db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,4 +18,3 @@ fi | |
|
||
# run cmd | ||
exec "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
128f3c2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
auto-gpt-next-web – ./
auto-gpt-next-web-git-main-dogtiti.vercel.app
auto-agentgpt.com
auto-gpt-next-web-dogtiti.vercel.app