-
Notifications
You must be signed in to change notification settings - Fork 69
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
docs(weave): Add TS to Cookbooks sidebar and scripts to convert TS files into MD files for render in docs #3370
base: master
Are you sure you want to change the base?
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=147a1d9b8b0ea6dbbf7a80a2502fb23710760589 |
docs/docs/reference/generated_typescript_docs/intro-notebook.md
Outdated
Show resolved
Hide resolved
@ash0ts looks like docs team can now approve changes, but it would probably be a good idea to get someone from @wandb/weave-team to take a look |
``` | ||
|
||
```typescript | ||
function stripUserInput(userInput: string): string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is duplicating the code above?
expected: "I write well" | ||
}, | ||
{ | ||
userInput: "GPT-4 is smartest AI model.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to consider changing this example to avoid the appearance of having favorites :-)
@@ -293,7 +390,7 @@ On a high-level the steps to create custom Scorer are quite simple: | |||
|
|||
</TabItem> | |||
<TabItem value="typescript" label="TypeScript"> | |||
```plaintext | |||
```typescript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't change this until there is code here - it will cause unwanted syntax highlighting of keywords.
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right?
} | ||
} | ||
|
||
main(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should end files with trailing newline
Changes:
Added TypeScript examples and documentation generation scripts.
Updated sidebars.ts to include TypeScript documentation.
Created scripts for generating TypeScript markdown docs from .ts files.
Added example TypeScript project configuration (tsconfig.json) and dependencies.