-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Close #760: IJsonApplication<Version, Types>
#1239
Conversation
feat: add orphan Type to `IJSONApplication` to save types
…e bit emension on the `unique symbol` tag type.
commit:
|
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.
@samchon
static symbol is ok!
Thanks
I tested with the latest code, and my library works fine!
This PR(type error as expected): https://stackblitz.com/edit/vitejs-vite-d7vwtr?file=index.ts
@ryoppippi static symbol? It means the static property right? If you think below is okay, it would be published to v6.10.0 with your CLI enhancement. import type { OpenApi, OpenApiV3 } from "@samchon/openapi";
export type IJsonApplication<
Version extends "3.0" | "3.1" = "3.1",
Types = unknown[],
> = Version extends "3.0"
? IJsonApplication.IV3_0<Types>
: IJsonApplication.IV3_1<Types>;
export namespace IJsonApplication {
export interface IV3_0<Types = unknown[]> {
version: "3.0";
schemas: OpenApiV3.IJsonSchema[];
components: OpenApiV3.IComponents;
__types?: Types;
}
export interface IV3_1<Types = unknown[]> {
version: "3.1";
components: OpenApi.IComponents;
schemas: OpenApi.IJsonSchema[];
__types?: Types;
}
} |
unique symbol
typed [tag]
property to be IJsonApplication
optional.IJsonApplication<Version, Types>
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
@SocketSecurity ignore npm/[email protected] @SocketSecurity ignore npm/[email protected] |
@samchon I think this approach works well. so using static property is fine! However, I'd like to suggest to use |
Also I didn't know that this enhancement is requested before lol #760 |
@ryoppippi Looking at your library, I think you need an LLM function calling schema generator. I made similar one (https://github.com/wrtnio/openai-function-schema) converting from OpenAPI document to LLM function calling schema, but what you need seems like not conversion from the Restful API's OpenAPI document, but just by the TypeScript function directly. How about suggesting a feature like below? Also, returned schema from For reference, below namespace and function name is just example. Just naming by your rule.
|
@samchon I agree that it is good if we have that kind of function, but those functions should be in separate package (like |
OpenAPI (not OpenAI) says that they are planning to publish v4 specification that is familiar to the AI (maybe LLM function calling schema). Following the roadmap, I'll move LLM function calling schema from Also, Anyway, don't mind of it about the LLM function calling schemas composition. If you and I need, just do it. As I've developed I think that such internal function's LLM calling can be a killer use-case of |
I like it! This is a good expression for
Got it. So do you merge this PR, or dealing this issue with other library? Also, |'m just curious why you use |
Accept this PR, but also needs the new feature. Wait for your suggestion. Also, no special reason for package naming. |
@samchon Thanks! OK got it! Thank you as always. |
@ryoppippi Needs your review.
Also, newly added tag must be such dynamic unique symbol type?
May I change it to just a static property like
__types: Types[]
?