Skip to content

Commit

Permalink
fixed exported interface name
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 committed Jul 21, 2023
1 parent 461da84 commit c97d9b8
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/smooth-cats-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ccat-api": patch
---

Fixed DefaultPromptSettings exported interface name
2 changes: 1 addition & 1 deletion api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export class CatClient {
}

private get url() {
return `${this.config.secure ? 's://' : '://'}
return `${this.config.secure ? 's' : ''}://
${this.config.baseUrl}
${this.config.port ? `:${this.config.port}` : ''}
`.replace(/\s/g, '')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* tslint:disable */
/* eslint-disable */

export type PromptSettings = {
export type DefaultPromptSettings = {
prefix: string;
use_episodic_memory: boolean;
use_declarative_memory: boolean;
Expand Down
6 changes: 3 additions & 3 deletions api/services/SettingsPromptService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { PromptSettings } from '../models/PromptSettings';
import type { DefaultPromptSettings } from '../models/DefaultPromptSettings';

import type { CancelablePromise } from '../core/CancelablePromise';
import type { BaseHttpRequest } from '../core/BaseHttpRequest';
Expand All @@ -13,10 +13,10 @@ export class SettingsPromptService {

/**
* Get Default Prompt Settings
* @returns PromptSettings Successful Response
* @returns DefaultPromptSettings Successful Response
* @throws ApiError
*/
public getDefaultPromptSettings(): CancelablePromise<PromptSettings> {
public getDefaultPromptSettings(): CancelablePromise<DefaultPromptSettings> {
return this.httpRequest.request({
method: 'GET',
url: '/settings/prompt/',
Expand Down
2 changes: 1 addition & 1 deletion api/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PromptSettings as DefaultPromptSettings } from './models/PromptSettings'
import { DefaultPromptSettings } from './models/DefaultPromptSettings'

export type PromptSettings = DefaultPromptSettings & Record<string, any>

Check warning on line 3 in api/utils.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected any. Specify a different type

Expand Down
6 changes: 3 additions & 3 deletions catapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PromptSettings"
"$ref": "#/components/schemas/DefaultPromptSettings"
}
}
}
Expand Down Expand Up @@ -1490,8 +1490,8 @@
}
}
},
"PromptSettings": {
"title": "PromptSettings",
"DefaultPromptSettings": {
"title": "DefaultPromptSettings",
"required": [
"prefix",
"use_episodic_memory",
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type { MetaData } from './api/models/MetaData';
export type { Plugin } from './api/models/Plugin';
export type { PluginsList } from './api/models/PluginsList';
export type { PluginSettings } from './api/models/PluginSettings';
export type { PromptSettings as DefaultPromptSettings } from './api/models/PromptSettings';
export type { DefaultPromptSettings } from './api/models/DefaultPromptSettings';
export type { QueryData } from './api/models/QueryData';
export type { JsonSchema } from './api/models/JsonSchema';
export type { Setting } from './api/models/Setting';
Expand Down

0 comments on commit c97d9b8

Please sign in to comment.