Skip to content

Commit cb442c1

Browse files
authored
Update README.md
Beginning of readme update
1 parent 9d6312b commit cb442c1

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed

README.md

+39-36
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,66 @@
1-
# Modzy JavaScript SDK
1+
<div align="center">
22

3-
Modzy's Javascript SDK simplifies tasks such as querying models, submitting jobs, and returning results. It supports both Node.js and browser JavaScript applications using the output target of your build system to know which code to use.
3+
![javascript-sdk-github-banner.png](https://raw.githubusercontent.com/modzy/sdk-javascript/main/javascript-sdk-github-banner.png)
44

5-
## Visit [docs.modzy.com](https://docs.modzy.com/docs/javascript) for docs, guides, API and more.
5+
![GitHub contributors](https://img.shields.io/github/contributors/modzy/sdk-javascript?logo=GitHub&style=flat)
6+
![GitHub last commit](https://img.shields.io/github/last-commit/modzy/sdk-javascript?logo=GitHub&style=flat)
7+
![GitHub issues](https://img.shields.io/github/issues-raw/modzy/sdk-javascript?logo=github&style=flat)
8+
![GitHub](https://img.shields.io/github/license/modzy/sdk-javascript?logo=apache&style=flat)
69

7-
These instructions are for Modzy JavaScript SDK v2, which is substantially different from v1.
10+
![npm (scoped)](https://img.shields.io/npm/v/@modzy/modzy-sdk?logo=npm)
11+
![npm](https://img.shields.io/npm/dm/@modzy/modzy-sdk?logo=npm)
812

9-
---
13+
**[JavaScript SDK Documentation Page](https://docs.modzy.com/docs/javascript)**
14+
15+
</div>
1016

11-
## Installation
17+
# Installation
1218

13-
From the command line in your project directory, run `yarn add @modzy/modzy-sdk` or `npm install @modzy/modzy-sdk`.
14-
Then import the ModzyClient class into your code:
19+
Intall Modzy's JavaScript SDK with NPM
1520

1621
```bash
17-
yarn add @modzy/modzy-sdk
18-
# or
1922
npm install @modzy/modzy-sdk
2023
```
24+
or YARN
2125

22-
```javascript
23-
import { ModzyClient } from "@modzy/modzy-sdk";
26+
```bash
27+
yarn add @modzy/modzy-sdk
2428
```
2529

26-
---
27-
28-
## Initialize
30+
# Usage/Examples
2931

30-
To initialize `ModzyClient`, you need an [api key](https://docs.modzy.com/docs/getting-started#key-download-your-api-key). If using an installation of Modzy other than app.modzy.com, you'll also need to provide the url for your instance of Modzy. For debugging purposes, you can also turn on logging.
31-
32-
⚠️ _Warning: Keep your API key secret. Do not include it in a git repo or store it on GitHub_
32+
## Initializing the SDK
33+
Initialize your client by authenticating with an API key. You can [download an API Key](https://docs.modzy.com/docs/view-and-manage-api-keys#download-team-api-key) from your instance of Modzy.
3334

3435
```javascript
35-
// app.modzy.com
36-
const modzyClient = new ModzyClient({
37-
apiKey: "xxxxxxxxxxxxx.xxxxxxxxxxxxx",
38-
});
36+
import { ModzyClient } from "@modzy/modzy-sdk";
3937

40-
// or for private Modzy instances
4138
const modzyClient = new ModzyClient({
42-
apiKey: "xxxxxxxxxxxxx.xxxxxxxxxxxxx",
43-
url: "https://modzy.yourdomain.com",
39+
apiKey: "Valid Modzy API Key", //e.g., "JbFkWZMx4Ea3epIrxSgA.a2fR36fZi3sdFPoztAXT"
40+
url: "Valid Modzy URL", //e.g., "https://trial.app.modzy.com"
4441
});
4542
```
4643

4744
---
4845

49-
## Basic usage
50-
51-
Submit a job providing the model, version and input text:
46+
## Running Inferences
47+
### Raw Text Inputs
48+
Submit an inference job to a text-based model by providing the model ID, version, and raw input text.
5249

5350
```javascript
51+
//Submit text to v1.0.1 of a Sentiment Analysis model, and to make the job explainable, change explain=True
5452
const { jobIdentifier } = await modzyClient.submitJobText({
5553
modelId: "ed542963de",
5654
version: "1.0.1",
5755
sources: {
58-
yourInputKey: {
59-
"input.txt": "Sometimes I really hate ribs",
56+
firstPhoneCall: {
57+
"input.txt": "Mr Watson, come here. I want to see you.",
6058
},
6159
},
6260
});
6361
```
6462

63+
## Getting Results
6564
Hold until the inference is complete:
6665

6766
```javascript
@@ -94,13 +93,17 @@ API_KEY=xxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxx
9493

9594
---
9695

97-
## Contributing
96+
# Support
9897

99-
We are happy to receive contributions from all of our users. Check out our [contributing file](https://github.com/modzy/sdk-javascript/tree/main/contributing.adoc) to learn more.
98+
For support, email [email protected] or join our [Slack](https://www.modzy.com/slack).
99+
# Contributing
100100

101-
---
101+
Contributions are always welcome!
102+
103+
See [`contributing.md`](https://github.com/modzy/sdk-javascript/tree/main/contributing.adoc) for ways to get started.
104+
105+
Please adhere to this project's `code of conduct`.
102106

103-
## Code of conduct
107+
We are happy to receive contributions from all of our users. Check out our contributing file to learn more.
104108

105-
Please see our [code of conduct](https://github.com/modzy/sdk-javascript/tree/main//CODE_OF_CONDUCT.md) for any questions about the kind of community we are trying to build.
106-
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/modzy/sdk-javascript/tree/main//CODE_OF_CONDUCT.md)
109+
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](https://github.com/modzy/sdk-javascript/tree/main/CODE_OF_CONDUCT.md)

0 commit comments

Comments
 (0)