pub struct PapersWithCodeClient { /* private fields */ }Expand description
Client for Papers With Code ML research database
§API Details
- Base URL: https://paperswithcode.com/api/v1
- Rate limit: 60 requests/minute
- No API key required
Implementations§
Source§impl PapersWithCodeClient
impl PapersWithCodeClient
Sourcepub fn with_embedding_dim(embedding_dim: usize) -> Self
pub fn with_embedding_dim(embedding_dim: usize) -> Self
Create a new Papers With Code client with custom embedding dimension
Sourcepub async fn search_papers(
&self,
query: &str,
) -> Result<Vec<PaperWithCodePaper>>
pub async fn search_papers( &self, query: &str, ) -> Result<Vec<PaperWithCodePaper>>
Sourcepub async fn list_datasets(&self) -> Result<Vec<PaperWithCodeDataset>>
pub async fn list_datasets(&self) -> Result<Vec<PaperWithCodeDataset>>
List datasets
Sourcepub async fn get_sota(&self, task: &str) -> Result<Vec<SotaEntry>>
pub async fn get_sota(&self, task: &str) -> Result<Vec<SotaEntry>>
Get state-of-the-art results for a task
§Arguments
task- Task name (e.g., “image-classification”, “question-answering”)
Sourcepub fn paper_to_vector(&self, paper: &PaperWithCodePaper) -> SemanticVector
pub fn paper_to_vector(&self, paper: &PaperWithCodePaper) -> SemanticVector
Convert paper to SemanticVector
Sourcepub fn dataset_to_vector(
&self,
dataset: &PaperWithCodeDataset,
) -> SemanticVector
pub fn dataset_to_vector( &self, dataset: &PaperWithCodeDataset, ) -> SemanticVector
Convert dataset to SemanticVector
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PapersWithCodeClient
impl !RefUnwindSafe for PapersWithCodeClient
impl Send for PapersWithCodeClient
impl Sync for PapersWithCodeClient
impl Unpin for PapersWithCodeClient
impl !UnwindSafe for PapersWithCodeClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more