Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Commit

Permalink
docs: fix a few typos; polish the language (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun authored Nov 29, 2023
1 parent 8a86f77 commit 86eb335
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,20 @@ Flappy is a production-ready Language Language Model (LLM) Application/Agent SDK

### Agent Features

In Flappy's ecosystem, an agent operates as a versatile conduit for the LLM, performing a variety of tasks such as structuring data, invoking external APIs, or sandboxing LLM-generated Python code as needed. This design philosophy caters to the increasing demand for LLM-based AI applications across various sectors.
In Flappy's ecosystem, an agent operates as a versatile conduit for the LLM, performing a variety of tasks such as ETL data, invoking external APIs, or running LLM-generated Python code in a sandbox when needed. This design philosophy caters to the increasing demand for LLM-based AI applications across various sectors.

The agent features in Flappy are built on two foundational types:
The agent features in Flappy are built on three foundational types:

1. **InvokeFunction**: This feature allows agents to interact with the environment. It's defined by input and output parameters, facilitating efficient interaction with the LLM.
2. **SynthesizedFunction**: This feature is processed by the LLM and only requires the definition of its description and the structure of its inputs and outputs.
1. **InvokeFunction**: This feature allows agents to interact with the environment. Users should implement these functions with pre-defined input and output parameters, facilitating efficient interaction of LLM and real world data.
2. **SynthesizedFunction**: This feature is processed by the LLM and only requires the definition of its description and the data structure declaration of the input and output types.
3. **CodeInterpreter** This feature allows agents to eval python code produced by LLMs in a safe sandbox that reduces runtime errors and potential security vulnerabilities, making it suitable for deployment in a production environment.

#### Function Implementation Details

Flappy introduces unique implementation mechanisms to enhance these functions:

- **Unique JSON Schema Integration**: Users can define abstract classes in their preferred programming language, which Flappy then transforms into JSON Schema schemas. This feature enhances machine readability and interoperability and manages the inputs and outputs of LLMs, providing controlled, consistent, and machine-readable data.
- **AST Parsing**: Flappy performs Abstract Syntax Tree (AST) parsing on the LLM outputs to ensure that the generated JSON data strictly adheres to the defined JSON Schema schema.
- **Unique JSON Schema Integration**: Users can define abstract classes in their preferred programming language, which is then transformed into JSON Schema schemas by Flappy. This feature enhances machine readability and interoperability and manages the inputs and outputs of LLMs, providing controlled, consistent, and machine-readable data.
- **AST Parsing**: Flappy performs Abstract Syntax Tree (AST) parsing on the LLM outputs to ensure that the generated JSON data strictly adheres to the defined JSON Schema.

### LLM Abstraction Layer

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Choose Flappy to be part of this revolution, to harness the full potential of AI

In Flappy's ecosystem, an agent operates as a versatile conduit for the LLM, performing a variety of tasks such as structuring data, invoking external APIs, or sandboxing LLM-generated Python code as needed. This design philosophy caters to the increasing demand for LLM-based AI applications across various sectors.

The agent functions in Flappy are built on two foundational types:
The agent functions in Flappy are built on three foundational types:

1. **InvokeFunction**: This function allows agents to interact with the environment. It's defined by input and output parameters, facilitating efficient interaction with the LLM.
2. **SynthesizedFunction**: This function is processed by the LLM and only requires the definition of its description and the structure of its inputs and outputs.
Expand Down
8 changes: 4 additions & 4 deletions packages/rust-core/java/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ thread_local! {

/// # Safety
///
/// This function could be only called by java vm when load this lib.
/// This function could be only called by java vm when loading this lib.
#[no_mangle]
pub unsafe extern "system" fn JNI_OnLoad(vm: JavaVM, _: *mut c_void) -> jint {
RUNTIME
Expand All @@ -58,7 +58,7 @@ pub unsafe extern "system" fn JNI_OnLoad(vm: JavaVM, _: *mut c_void) -> jint {

/// # Safety
///
/// This function could be only called by java vm when unload this lib.
/// This function could be only called by java vm when unloading this lib.
#[no_mangle]
pub unsafe extern "system" fn JNI_OnUnload(_: JavaVM, _: *mut c_void) {
if let Some(r) = RUNTIME.take() {
Expand All @@ -68,15 +68,15 @@ pub unsafe extern "system" fn JNI_OnUnload(_: JavaVM, _: *mut c_void) {

/// # Safety
///
/// This function could be only when the lib is loaded and within a RUNTIME-spawned thread.
/// This function could be only called when the lib is loaded and within a RUNTIME-spawned thread.
unsafe fn get_current_env<'local>() -> JNIEnv<'local> {
let env = ENV.with(|cell| *cell.borrow_mut()).unwrap();
JNIEnv::from_raw(env).unwrap()
}

/// # Safety
///
/// This function could be only when the lib is loaded.
/// This function could be only called when the lib is loaded.
unsafe fn get_global_runtime<'local>() -> &'local Runtime {
RUNTIME.get_unchecked()
}
Expand Down

0 comments on commit 86eb335

Please sign in to comment.