@raycast/api 1.49.1 → 1.49.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.d.ts +20 -3
- package/package.json +1 -1
- package/types/index.d.ts +20 -3
package/api.d.ts
CHANGED
|
@@ -7917,14 +7917,19 @@ export declare namespace unstable_AI {
|
|
|
7917
7917
|
* }
|
|
7918
7918
|
* ```
|
|
7919
7919
|
*/
|
|
7920
|
-
export function ask(prompt: string, options?:
|
|
7920
|
+
export function ask(prompt: string, options?: AskOptions): Promise<string> & {
|
|
7921
7921
|
on(event: "data", listener: (chunk: string) => void): void;
|
|
7922
7922
|
};
|
|
7923
|
-
export type
|
|
7923
|
+
export type AskOptions = {
|
|
7924
7924
|
/**
|
|
7925
|
-
*
|
|
7925
|
+
* Concrete tasks, such as fixing grammar, require less creativity while open-ended questions, such as generating ideas, require more.
|
|
7926
|
+
* If a number is passed, it needs to be in the range 0-2. For larger values, 2 will be used. For lower values, 0 will be used.
|
|
7926
7927
|
*/
|
|
7927
7928
|
creativity?: Creativity;
|
|
7929
|
+
/**
|
|
7930
|
+
* The AI model to use to answer to the prompt.
|
|
7931
|
+
*/
|
|
7932
|
+
model?: Model;
|
|
7928
7933
|
/**
|
|
7929
7934
|
* Abort signal to cancel the request.
|
|
7930
7935
|
*/
|
|
@@ -7935,6 +7940,10 @@ export declare namespace unstable_AI {
|
|
|
7935
7940
|
* If a number is passed, it needs to be in the range 0-2. For larger values, 2 will be used. For lower values, 0 will be used.
|
|
7936
7941
|
*/
|
|
7937
7942
|
export type Creativity = "none" | "low" | "medium" | "high" | "maximum" | number;
|
|
7943
|
+
/**
|
|
7944
|
+
* @default `"text-davinci-003"``
|
|
7945
|
+
*/
|
|
7946
|
+
export type Model = "text-davinci-003" | "gpt-3.5-turbo";
|
|
7938
7947
|
}
|
|
7939
7948
|
|
|
7940
7949
|
/**
|
|
@@ -8040,7 +8049,15 @@ export declare function useNavigation(): Navigation;
|
|
|
8040
8049
|
* ```
|
|
8041
8050
|
*/
|
|
8042
8051
|
export declare function useUnstableAI(prompt: string, options?: {
|
|
8052
|
+
/**
|
|
8053
|
+
* Concrete tasks, such as fixing grammar, require less creativity while open-ended questions, such as generating ideas, require more.
|
|
8054
|
+
* If a number is passed, it needs to be in the range 0-2. For larger values, 2 will be used. For lower values, 0 will be used.
|
|
8055
|
+
*/
|
|
8043
8056
|
creativity?: unstable_AI.Creativity;
|
|
8057
|
+
/**
|
|
8058
|
+
* The AI model to use to answer to the prompt.
|
|
8059
|
+
*/
|
|
8060
|
+
model?: unstable_AI.Model;
|
|
8044
8061
|
stream?: boolean;
|
|
8045
8062
|
} & Omit<PromiseOptions<FunctionReturningPromise>, "abortable">): {
|
|
8046
8063
|
isLoading: boolean;
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -7913,14 +7913,19 @@ export declare namespace unstable_AI {
|
|
|
7913
7913
|
* }
|
|
7914
7914
|
* ```
|
|
7915
7915
|
*/
|
|
7916
|
-
export function ask(prompt: string, options?:
|
|
7916
|
+
export function ask(prompt: string, options?: AskOptions): Promise<string> & {
|
|
7917
7917
|
on(event: "data", listener: (chunk: string) => void): void;
|
|
7918
7918
|
};
|
|
7919
|
-
export type
|
|
7919
|
+
export type AskOptions = {
|
|
7920
7920
|
/**
|
|
7921
|
-
*
|
|
7921
|
+
* Concrete tasks, such as fixing grammar, require less creativity while open-ended questions, such as generating ideas, require more.
|
|
7922
|
+
* If a number is passed, it needs to be in the range 0-2. For larger values, 2 will be used. For lower values, 0 will be used.
|
|
7922
7923
|
*/
|
|
7923
7924
|
creativity?: Creativity;
|
|
7925
|
+
/**
|
|
7926
|
+
* The AI model to use to answer to the prompt.
|
|
7927
|
+
*/
|
|
7928
|
+
model?: Model;
|
|
7924
7929
|
/**
|
|
7925
7930
|
* Abort signal to cancel the request.
|
|
7926
7931
|
*/
|
|
@@ -7931,6 +7936,10 @@ export declare namespace unstable_AI {
|
|
|
7931
7936
|
* If a number is passed, it needs to be in the range 0-2. For larger values, 2 will be used. For lower values, 0 will be used.
|
|
7932
7937
|
*/
|
|
7933
7938
|
export type Creativity = "none" | "low" | "medium" | "high" | "maximum" | number;
|
|
7939
|
+
/**
|
|
7940
|
+
* @default `"text-davinci-003"``
|
|
7941
|
+
*/
|
|
7942
|
+
export type Model = "text-davinci-003" | "gpt-3.5-turbo";
|
|
7934
7943
|
}
|
|
7935
7944
|
|
|
7936
7945
|
/**
|
|
@@ -8036,7 +8045,15 @@ export declare function useNavigation(): Navigation;
|
|
|
8036
8045
|
* ```
|
|
8037
8046
|
*/
|
|
8038
8047
|
export declare function useUnstableAI(prompt: string, options?: {
|
|
8048
|
+
/**
|
|
8049
|
+
* Concrete tasks, such as fixing grammar, require less creativity while open-ended questions, such as generating ideas, require more.
|
|
8050
|
+
* If a number is passed, it needs to be in the range 0-2. For larger values, 2 will be used. For lower values, 0 will be used.
|
|
8051
|
+
*/
|
|
8039
8052
|
creativity?: unstable_AI.Creativity;
|
|
8053
|
+
/**
|
|
8054
|
+
* The AI model to use to answer to the prompt.
|
|
8055
|
+
*/
|
|
8056
|
+
model?: unstable_AI.Model;
|
|
8040
8057
|
stream?: boolean;
|
|
8041
8058
|
} & Omit<PromiseOptions<FunctionReturningPromise>, "abortable">): {
|
|
8042
8059
|
isLoading: boolean;
|