Skip to content

Commit

Permalink
Refine tips for change robot.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 10, 2023
1 parent af98159 commit d943151
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,8 @@ func handleUploadQuestionAudio(ctx context.Context, w http.ResponseWriter, r *ht
} else {
temperature = float32(v)
}
logger.Tf(ctx, "robot=%v(%v), AIT_CHAT_MODEL: %v, AIT_MAX_TOKENS: %v, AIT_TEMPERATURE: %v",
robot.uuid, robot.label, model, maxTokens, temperature)
logger.Tf(ctx, "robot=%v(%v), AIT_CHAT_MODEL: %v, AIT_MAX_TOKENS: %v, AIT_TEMPERATURE: %v, histories=%v",
robot.uuid, robot.label, model, maxTokens, temperature, len(stage.histories))

gptChatStream, err := client.CreateChatCompletionStream(
ctx, openai.ChatCompletionRequest{
Expand Down
3 changes: 2 additions & 1 deletion src/debugPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export function useDebugPanel(playerRef) {

// Write a summary or info log, which is important but short message for user.
const info = React.useCallback((msg) => {
console.log(`[info] ${buildLog(msg)}`);
ref.current.infoLogs = [...ref.current.infoLogs, msg];
setInfoLogs(ref.current.infoLogs);
}, [ref, setInfoLogs]);
Expand Down Expand Up @@ -46,7 +47,7 @@ export function useDebugPanel(playerRef) {
}, [verbose, playerRef]);

return [info, verbose, showVerboseLogs, <React.Fragment>
<div style={{textAlign: 'right', padding: '10px'}}>
<div style={{textAlign: 'right'}}>
<button onClick={(e) => {
verbose(`Set debugging to ${!showVerboseLogs}`);
setShowVerboseLogs(!showVerboseLogs);
Expand Down
1 change: 1 addition & 0 deletions src/robotInitiator.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export function useRobotInitiator(info, verbose, playerRef) {
const robot = availableRobots.find(robot => robot.uuid === e.target.value);
setPreviewRobot(robot);
RobotConfig.save(robot);
info(`Change robot to ${robot.label}`);
verbose(`Change to robot ${robot.label} ${robot.uuid}`);
}, [info, verbose, availableRobots, setPreviewRobot]);

Expand Down

0 comments on commit d943151

Please sign in to comment.