Skip to content
This repository has been archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
Minor example updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brannondorsey committed Apr 29, 2020
1 parent 8e83cad commit 5ff9ec7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ This library is a thin wrapper around the Hosted Models [HTTP API](https://learn

If your project is written in JavaScript, we encourage you to use this library!

## Example
## Examples

See the [`examples/`](examples) directory for a full list of examples.

### Node.js / Module Syntax

Expand Down Expand Up @@ -58,3 +60,7 @@ model.query({ prompt }).then(result => console.log(result));
## License

This library is released under the terms of the [MIT license](LICENSE).

## CHANGELOG

You can view a list of changes [here](CHANGELOG.md).
1 change: 1 addition & 0 deletions examples/browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Basic Example</title>
</head>
<body>
<p>Open the developer's console</p>
<script src="https://cdn.jsdelivr.net/npm/@runwayml/hosted-models@latest/dist/hosted-models.js"></script>
<script>
const model = new rw.HostedModel({
Expand Down
9 changes: 4 additions & 5 deletions examples/node.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const { HostedModel } = require('@runway/hosted-models');
const { HostedModel } = require('@runwayml/hosted-models');

async function main() {
const model = new HostedModel({
url: 'https://lotr.hosted-models.runwayml.cloud/v1/',
url: 'https://my-model.hosted-models.runwayml.cloud/v1',
token: 'my-private-hosted-model-token',
});
// await model.waitUntilAwake();
const result = await model.query({
prompt: 'The one ring to',
max_characters: 180,
prompt: 'Hey text generation model, finish my sentence',
});
console.log(result.generated_text);
}
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ff9ec7

Please sign in to comment.