Skip to content

Commit

Permalink
v0.3.45
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Apr 30, 2024
1 parent a8c5ae7 commit f3c2bf9
Show file tree
Hide file tree
Showing 29 changed files with 624 additions and 2,023 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.44",
"version": "0.3.45",
"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,25 +1,25 @@
import axios, { Axios, AxiosError, AxiosRequestConfig, CreateAxiosDefaults } from "axios"
import { PremBaseConfig } from "$types/index"

import finetuning-adminModule from "$modules/finetuning-admin"
import chatcompletionsModule from "$modules/chat.completions"
import datapointsModule from "$modules/datapoints"
import embeddingsModule from "$modules/embeddings"
import finetuningModule from "$modules/finetuning"
import modelsModule from "$modules/models"
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

finetuning-admin = new finetuning-adminModule(this)
chat = { completions: new chatcompletionsModule(this) }
datapoints = new datapointsModule(this)
chat = { completions: new chatcompletionsModule(this) }
embeddings = new embeddingsModule(this)
finetuning = new finetuningModule(this)
models = new modelsModule(this)
repository = { document: new repositorydocumentModule(this) }
feedbacks = new feedbacksModule(this)
traces = new tracesModule(this)

constructor(config: PremBaseConfig, axiosConfig?: CreateAxiosDefaults) {
this.config = Object.assign({ baseUrl: "https://app.premai.io" }, config)
Expand Down
17 changes: 0 additions & 17 deletions src/modules/datapoints/index.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/modules/datapoints/operations/v1_data_points_create.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/modules/datapoints/operations/v1_data_points_destroy.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/modules/datapoints/operations/v1_data_points_partial_update.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/modules/datapoints/operations/v1_data_points_update.ts

This file was deleted.

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

import v1_set_trace_feedback_create from "./operations/v1_set_trace_feedback_create"

export default class extends APIModule {
create = v1_set_trace_feedback_create(this.client)
}
12 changes: 12 additions & 0 deletions src/modules/feedbacks/operations/v1_set_trace_feedback_create.ts
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["v1_set_trace_feedback_create"]["requestBody"]["content"]["application/json"], options?: AxiosRequestConfig): Promise<operations["v1_set_trace_feedback_create"]["responses"]["200"]["content"]["application/json"]> => {
return client.call({
method: "post",
url: `/v1/set_trace_feedback`,
data: params,
...options
})
}
33 changes: 0 additions & 33 deletions src/modules/finetuning-admin/index.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 9 additions & 0 deletions src/modules/traces/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { APIModule } from "$components/index"

import v1_traces_list from "./operations/v1_traces_list"
import v1_traces_retrieve from "./operations/v1_traces_retrieve"

export default class extends APIModule {
list = v1_traces_list(this.client)
retrieve = v1_traces_retrieve(this.client)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { AxiosRequestConfig } from "axios"
import Prem from "$src/index"
import type { operations } from "$types/api"

export default (client: Prem) => (options?: AxiosRequestConfig): Promise<operations["v1_data_points_list"]["responses"]["200"]["content"]["application/json"]> => {
export default (client: Prem) => (options?: AxiosRequestConfig): Promise<operations["v1_traces_list"]["responses"]["200"]["content"]["application/json"]> => {
return client.call({
method: "get",
url: `/v1/data-points/`,
url: `/v1/traces/`,

...options
})
Expand Down
Loading

0 comments on commit f3c2bf9

Please sign in to comment.