🎯 Major improvements to MissionControl component: - Always keep input field visible and functional after AI responses - Auto-clear input after submitting questions for better UX - Add dynamic visual indicators (first question vs follow-up) - Improve response layout with clear separation and hints - Enable proper chat-like experience for continuous learning 🌟 Additional enhancements: - Better language-specific messaging throughout interface - Clearer visual hierarchy between input and response areas - Intuitive flow that guides users to ask follow-up questions - Maintains responsive design and accessibility 🔧 Technical changes: - Enhanced MissionControl state management - Improved component layout and styling - Better TypeScript integration across components - Updated tsconfig for stricter type checking
110 lines
3.6 KiB
JavaScript
110 lines
3.6 KiB
JavaScript
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
import { APIResource } from "../../../resource.mjs";
|
|
import { isRequestOptions } from "../../../core.mjs";
|
|
import * as CheckpointsAPI from "./checkpoints.mjs";
|
|
import { Checkpoints, FineTuningJobCheckpointsPage, } from "./checkpoints.mjs";
|
|
import { CursorPage } from "../../../pagination.mjs";
|
|
export class Jobs extends APIResource {
|
|
constructor() {
|
|
super(...arguments);
|
|
this.checkpoints = new CheckpointsAPI.Checkpoints(this._client);
|
|
}
|
|
/**
|
|
* Creates a fine-tuning job which begins the process of creating a new model from
|
|
* a given dataset.
|
|
*
|
|
* Response includes details of the enqueued job including job status and the name
|
|
* of the fine-tuned models once complete.
|
|
*
|
|
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const fineTuningJob = await client.fineTuning.jobs.create({
|
|
* model: 'gpt-4o-mini',
|
|
* training_file: 'file-abc123',
|
|
* });
|
|
* ```
|
|
*/
|
|
create(body, options) {
|
|
return this._client.post('/fine_tuning/jobs', { body, ...options });
|
|
}
|
|
/**
|
|
* Get info about a fine-tuning job.
|
|
*
|
|
* [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning)
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const fineTuningJob = await client.fineTuning.jobs.retrieve(
|
|
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
* );
|
|
* ```
|
|
*/
|
|
retrieve(fineTuningJobId, options) {
|
|
return this._client.get(`/fine_tuning/jobs/${fineTuningJobId}`, options);
|
|
}
|
|
list(query = {}, options) {
|
|
if (isRequestOptions(query)) {
|
|
return this.list({}, query);
|
|
}
|
|
return this._client.getAPIList('/fine_tuning/jobs', FineTuningJobsPage, { query, ...options });
|
|
}
|
|
/**
|
|
* Immediately cancel a fine-tune job.
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const fineTuningJob = await client.fineTuning.jobs.cancel(
|
|
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
* );
|
|
* ```
|
|
*/
|
|
cancel(fineTuningJobId, options) {
|
|
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/cancel`, options);
|
|
}
|
|
listEvents(fineTuningJobId, query = {}, options) {
|
|
if (isRequestOptions(query)) {
|
|
return this.listEvents(fineTuningJobId, {}, query);
|
|
}
|
|
return this._client.getAPIList(`/fine_tuning/jobs/${fineTuningJobId}/events`, FineTuningJobEventsPage, {
|
|
query,
|
|
...options,
|
|
});
|
|
}
|
|
/**
|
|
* Pause a fine-tune job.
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const fineTuningJob = await client.fineTuning.jobs.pause(
|
|
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
* );
|
|
* ```
|
|
*/
|
|
pause(fineTuningJobId, options) {
|
|
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/pause`, options);
|
|
}
|
|
/**
|
|
* Resume a fine-tune job.
|
|
*
|
|
* @example
|
|
* ```ts
|
|
* const fineTuningJob = await client.fineTuning.jobs.resume(
|
|
* 'ft-AF1WoRqd3aJAHsqc9NY7iL8F',
|
|
* );
|
|
* ```
|
|
*/
|
|
resume(fineTuningJobId, options) {
|
|
return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/resume`, options);
|
|
}
|
|
}
|
|
export class FineTuningJobsPage extends CursorPage {
|
|
}
|
|
export class FineTuningJobEventsPage extends CursorPage {
|
|
}
|
|
Jobs.FineTuningJobsPage = FineTuningJobsPage;
|
|
Jobs.FineTuningJobEventsPage = FineTuningJobEventsPage;
|
|
Jobs.Checkpoints = Checkpoints;
|
|
Jobs.FineTuningJobCheckpointsPage = FineTuningJobCheckpointsPage;
|
|
//# sourceMappingURL=jobs.mjs.map
|