-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Max token Setting #315
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -76,7 +84,7 @@ const Input = (props: InputProps) => { | |||
inputElement = ( | |||
<textarea | |||
className={clsx( | |||
"border:black delay-50 w-full resize-none h-20 rounded-xl bg-[#3a3a3a] text-sm tracking-wider outline-0 transition-all placeholder:text-white/20 hover:border-[#1E88E5]/40 focus:border-[#1E88E5] py-3 md:text-lg border-[2px] border-white/10 px-2", | |||
"border:black delay-50 h-20 w-full resize-none rounded-xl border-[2px] border-white/10 bg-[#3a3a3a] px-2 py-3 text-sm tracking-wider outline-0 transition-all placeholder:text-white/20 hover:border-[#1E88E5]/40 focus:border-[#1E88E5] md:text-lg", |
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.
automatic re-order
close(); | ||
const updateSettings = <Key extends keyof ModelSettings>( | ||
key: Key, | ||
value: ModelSettings[Key] |
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.
generics 😍
openAIApiKey: _settings?.customApiKey || process.env.OPENAI_API_KEY, | ||
temperature: _settings?.customTemperature || 0.9, | ||
modelName: _settings?.customModelName || GPT_35_TURBO, | ||
maxTokens: _settings?.maxTokens || 400, |
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.
this is cleaner now
customModelName: GPT_35_TURBO, | ||
customTemperature: 0.9, | ||
customMaxLoops: DEFAULT_MAX_LOOPS_FREE, | ||
maxTokens: 400, |
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.
should we make these constants
|
||
const handleNewGoal = () => { | ||
const agent = new AutonomousAgent( | ||
name.trim(), | ||
goalInput.trim(), | ||
handleAddMessage, | ||
() => setAgent(null), | ||
{ customApiKey, customModelName, customTemperature, customMaxLoops }, | ||
customSettings[0], |
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.
should we extract these from the array
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.
I agree, this is actually just an array of two, [settings, setSettings]
No description provided.