Skip to content
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

feat(stream-text)!: re-implement #44

Merged
merged 12 commits into from
Feb 15, 2025
Merged

Conversation

exoticknight
Copy link
Contributor

  • onChunk
  • onStepFinish
  • onFinish
  • chunkStream
  • stepStream
  • textStream

@exoticknight
Copy link
Contributor Author

#7

@kwaa kwaa requested a review from nekomeowww February 15, 2025 09:24
@kwaa kwaa mentioned this pull request Feb 15, 2025
@exoticknight exoticknight changed the title feat(stream-text): reimplement streamText WIP: feat(stream-text): reimplement streamText Feb 15, 2025
let usage: undefined | Usage
// state
const steps: StreamTextStep[] = []
const stepOne = async (options: StreamTextOptions): RecursivePromise<void> => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of things are happening here, there is no comments or diagrams to explain the workflow, or could we have a split version of those functions for better readabilities? What do you think @kwaa ?

I'm in favor of splitting functions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The processing of messages primarily follows the workflow of OpenAI's SDK. Multi-step conversations are implemented with reference to generateText. Each step represents a single dialogue flow, which may output multiple chunks during that step.

exoticknight and others added 4 commits February 15, 2025 21:41
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
Co-authored-by: Neko <neko@ayaka.moe>
@kwaa kwaa changed the title WIP: feat(stream-text): reimplement streamText feat(stream-text)!: re-implement Feb 15, 2025
@kwaa kwaa merged commit 83a65ca into moeru-ai:main Feb 15, 2025
1 check passed
@exoticknight exoticknight deleted the feat/streamtext branch February 17, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants