Skip to content

Commit

Permalink
v0.3.78
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Nov 21, 2024
1 parent 9b4e6bc commit 5466b81
Show file tree
Hide file tree
Showing 10 changed files with 148 additions and 292 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@premai/prem-sdk",
"version": "0.3.76",
"version": "0.3.78",
"license": "MIT",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import axios, { Axios, AxiosError, AxiosRequestConfig, CreateAxiosDefaults } from "axios"
import { PremBaseConfig } from "$types/index"

import repositoriesModule from "$modules/repositories"
import repositorydocumentModule from "$modules/repository.document"
import chatcompletionsModule from "$modules/chat.completions"
import embeddingsModule from "$modules/embeddings"
import modelsModule from "$modules/models"
import repositoriesModule from "$modules/repositories"
import repositorydocumentModule from "$modules/repository.document"
import feedbacksModule from "$modules/feedbacks"
import tracesModule from "$modules/traces"

export default class Prem {
config: PremBaseConfig & { baseUrl: string }
axios: Axios

chat = { completions: new chatcompletionsModule(this) }
repositories = new repositoriesModule(this)
repository = { document: new repositorydocumentModule(this) }
chat = { completions: new chatcompletionsModule(this) }
embeddings = new embeddingsModule(this)
models = new modelsModule(this)
repositories = new repositoriesModule(this)
repository = { document: new repositorydocumentModule(this) }
feedbacks = new feedbacksModule(this)
traces = new tracesModule(this)

Expand Down
4 changes: 2 additions & 2 deletions src/modules/repositories/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { APIModule } from "$components/index"

import v1_repositories_create from "./operations/v1_repositories_create"
import api_repositories_repositories_create from "./operations/api_repositories_repositories_create"

export default class extends APIModule {
create = v1_repositories_create(this.client)
create = api_repositories_repositories_create(this.client)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { AxiosRequestConfig } from "axios"
import Prem from "$src/index"
import type { operations } from "$types/api"

export default (client: Prem) => (params: operations["api_repositories_repositories_create"]["requestBody"]["content"]["application/json"], options?: AxiosRequestConfig): Promise<operations["api_repositories_repositories_create"]["responses"]["201"]["content"]["application/json"]> => {
return client.call({
method: "post",
url: `/api/repositories/repositories/`,
data: params,
...options
})
}
12 changes: 0 additions & 12 deletions src/modules/repositories/operations/v1_repositories_create.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/modules/repository.document/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { APIModule } from "$components/index"

import v1_repository_document_create from "./operations/v1_repository_document_create"
import api_repositories_repository_document_create from "./operations/api_repositories_repository_document_create"

export default class extends APIModule {
create = v1_repository_document_create(this.client)
create = api_repositories_repository_document_create(this.client)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { AxiosRequestConfig } from "axios"
import Prem from "$src/index"
import type { operations } from "$types/api"

export default (client: Prem) => (repository_id: string, options?: AxiosRequestConfig): Promise<operations["api_repositories_repository_document_create"]["responses"]["201"]["content"]["application/json"]> => {
return client.call({
method: "post",
url: `/api/repositories/repository/${repository_id}/document`,

...options
})
}

This file was deleted.

Loading

0 comments on commit 5466b81

Please sign in to comment.