Skip to content

Commit 3d1cd77

Browse files
committed
fix failed tests
1 parent c30fef7 commit 3d1cd77

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

chat/chat_server/src/models/messages.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ mod tests {
158158
files: vec![],
159159
};
160160
let message = state
161-
.create_message(input, 1, 1)
161+
.create_message(input, 2, 1)
162162
.await
163163
.expect("create message failed");
164164
assert_eq!(message.content, "hello");
@@ -169,7 +169,7 @@ mod tests {
169169
files: vec!["1".to_string()],
170170
};
171171

172-
let err = state.create_message(input, 1, 1).await.unwrap_err();
172+
let err = state.create_message(input, 2, 1).await.unwrap_err();
173173
assert_eq!(err.to_string(), "Invalid chat file path: 1");
174174

175175
// valid files should work

chat/chat_test/tests/chat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl ChatServer {
168168
.header("Authorization", format!("Bearer {}", self.token))
169169
.header("Content-Type", "application/json")
170170
.body(
171-
r#"{"name": "test agent", "type": "proxy", "prompt": "You are a helpful agent"}"#,
171+
r#"{"name": "test agent", "type": "proxy", "adapter": "openai", "model": "gpt-4o", "prompt": "You are a helpful agent"}"#,
172172
);
173173
let res = res.send().await?;
174174
assert_eq!(res.status(), StatusCode::CREATED);

0 commit comments

Comments
 (0)