Comments (3)
This is pretty easy to do. Just assign a new function to createRequestPrompt
after you call createJsonTranslator
. For example:
const translator = createJsonTranslator<Cart>(model, schema, "Cart");
const defaultRequestPrompt = translator.createRequestPrompt;
translator.createRequestPrompt = request => `${prefixPrompt}\n${defaultRequestPrompt(request)}`;
from typechat.
@ahejlsberg Thanks a lot!
from typechat.
Maybe it's better to add this issue to FAQ ? I think this is quite helpful for different concrete purposes, which are not and can't be described clearly by typescript types.
from typechat.
Related Issues (20)
- getting started example? HOT 3
- should we read interface as a text file? HOT 2
- error when using translate function
- Streaming HOT 1
- Feat: Add support for Vision API and Input Images
- Add `@dataclass` support to Python
- Ensure Python compatibility back to 3.11 HOT 2
- Implement some snapshot testing for our Python schema translation HOT 1
- Provide helper function parity between TS and Python HOT 1
- Use a chat session as context
- How to log the prompt generated by typechat? HOT 2
- [FEATURE REQUEST] Ollama compatibility
- when will v0.1.0 be released to npm? HOT 5
- docs/examples.md links are broken HOT 1
- [python] Why the hatch dependency? HOT 2
- [Python] Support using keyless auth for Azure OpenAI HOT 1
- [Python] Python specific repo
- [python] Show a non-chat example in docs
- [python] Empty failure message HOT 3
- [python] Upgrade the imports in examples HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typechat.