Skip to content

Commit

Permalink
handle response
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuckHend committed Nov 20, 2023
1 parent 2018ad4 commit e1fbf5a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/transformers/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ use serde::{Deserialize, Serialize};

#[derive(Deserialize, Debug)]
pub struct EmbeddingResponse {
pub data: Vec<DataObject>,
pub data: Vec<EmbeddingObject>,
pub model: String,
}

#[derive(serde::Deserialize, Debug)]
pub struct DataObject {
pub struct EmbeddingObject {
// object: String,
// index: usize,
pub index: usize,
pub embedding: Vec<f64>,
}

Expand Down

0 comments on commit e1fbf5a

Please sign in to comment.