Skip to content

Rc other keys #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion examples/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ async function main() {

const substrate = new Substrate({ apiKey: SUBSTRATE_API_KEY });

const story = new ComputeText({ prompt: "tell me a story" });
const story = new ComputeText({
prompt: "tell me a story",
model: "Llama3Instruct8B",
temperature: 0.8,
});
const summary = new ComputeText({
model: "Llama3Instruct8B",
prompt: sb.interpolate`summarize this story in one sentence: ${story.future.text}`,
temperature: 0.3,
});

const res = await substrate.run(story, summary);
Expand Down
2 changes: 1 addition & 1 deletion src/GEN_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20240617.20240815
20240617.20240911
16 changes: 10 additions & 6 deletions src/Nodes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* 𐃏 Substrate
* @generated file
* 20240617.20240815
* 20240617.20240911
*/

import * as OpenAPI from "substrate/OpenAPI";
Expand Down Expand Up @@ -2301,11 +2301,11 @@ export class TranscribeSpeechIn extends FutureObject {
get prompt() {
return new FutureString(this._directive.next("prompt"));
}
/** (Optional) Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. */
/** (Optional) Language of input audio in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format. Use `auto` to automatically detect the language. */
get language() {
return new FutureString(this._directive.next("language"));
}
/** (Optional) Segment the text into sentences with approximate timestamps. */
/** (Optional) (Deprecated) Segment the text into sentences with approximate timestamps. */
get segment() {
return new FutureBoolean(this._directive.next("segment"));
}
Expand Down Expand Up @@ -2403,6 +2403,10 @@ export class TranscribeSpeechOut extends FutureObject {
get segments() {
return new TranscribeSpeechOutSegments(this._directive.next("segments"));
}
/** (Optional) Language code of transcribed text. */
get language() {
return new FutureString(this._directive.next("language"));
}

/** (Optional) Chapter markers, if `suggest_chapters` is enabled. */
get chapters() {
Expand Down Expand Up @@ -4866,7 +4870,7 @@ export class TranscribeSpeech extends Node {
/**
* Input arguments: `audio_uri`, `prompt` (optional), `language` (optional), `segment` (optional), `align` (optional), `diarize` (optional), `suggest_chapters` (optional)
*
* Output fields: `text`, `segments` (optional), `chapters` (optional)
* Output fields: `text`, `segments` (optional), `language` (optional), `chapters` (optional)
*
* https://www.substrate.run/nodes#TranscribeSpeech
*/
Expand All @@ -4881,7 +4885,7 @@ export class TranscribeSpeech extends Node {
/**
* Retrieve this node's output from a response.
*
* Output fields: `text`, `segments` (optional), `chapters` (optional)
* Output fields: `text`, `segments` (optional), `language` (optional), `chapters` (optional)
*
* https://www.substrate.run/nodes#TranscribeSpeech
*/
Expand All @@ -4898,7 +4902,7 @@ export class TranscribeSpeech extends Node {
/**
* Future reference to this node's output.
*
* Output fields: `text`, `segments` (optional), `chapters` (optional)
* Output fields: `text`, `segments` (optional), `language` (optional), `chapters` (optional)
*
* https://www.substrate.run/nodes#TranscribeSpeech
*/
Expand Down
Loading
Loading