Skip to content

Commit 6f08d1e

Browse files
authored
fix: get attachments in chat sessioins (#392)
1 parent de89ad8 commit 6f08d1e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

docs/content.en/docs/release-notes/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Information about release notes of Coco Server is provided here.
3030
- fix: fixed the problem of not being able to search in secondary directories #338
3131
- fix: active shadow setting #354
3232
- fix: chat history was not show up #377
33+
- fix: get attachments in chat sessioins
3334

3435
### Improvements
3536

src-tauri/src/server/attachment.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ pub struct AttachmentSource {
3030
#[derive(Debug, Serialize, Deserialize)]
3131
pub struct AttachmentHit {
3232
pub _index: String,
33-
pub _type: String,
33+
pub _type: Option<String>,
3434
pub _id: String,
35-
pub _score: f64,
35+
pub _score: Option<f64>,
3636
pub _source: AttachmentSource,
3737
}
3838

3939
#[derive(Debug, Serialize, Deserialize)]
4040
pub struct AttachmentHits {
4141
pub total: Value,
42-
pub max_score: f64,
42+
pub max_score: Option<f64>,
4343
pub hits: Vec<AttachmentHit>,
4444
}
4545

0 commit comments

Comments
 (0)