Skip to content

Commit

Permalink
v0.5.9 - merge openai api into main loop
Browse files Browse the repository at this point in the history
allows openai api to output the same image/speech as candle does!

TODO:
may have spacing issues at times, the output fromt the the stream
output from the web api of llama.cpp seems to contain some empty
new line only tokens we aren't handling perfectly which leads
to some concatenated sentence end/beginnings.
  • Loading branch information
Chris Kennedy committed Mar 24, 2024
1 parent 2be117a commit 37d5d94
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 502 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license-file = "LICENSE"
homepage = "https://github.com/groovybits/rsllm/wiki"
repository = "https://github.com/groovybits/rsllm"
authors = ["Chris Kennedy"]
version = "0.5.8"
version = "0.5.9"
edition = "2021"

[lib]
Expand Down
10 changes: 8 additions & 2 deletions scripts/twitch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ALIGNMENT=right
TEMPERATURE=0.8
CONTINUOUS=1
POLL_INTERVAL=0
PIPELINE_CONCURRENCY=8
TWITCH_LLM_CONCURRENCY=2
PIPELINE_CONCURRENCY=1
TWITCH_LLM_CONCURRENCY=1
CONTEXT_SIZE=4000
SUBTITLES=1
DAEMON=1
Expand All @@ -29,14 +29,19 @@ GREETING="Hi I'm Alice, ask me a question!"
TWITCH_CHAT_HISTORY=8
TWITCH_MODEL=mistral
ASYNC_CONCURRENCY=0
USE_API=1
# === END OF CONFIGURATION ===
#
#
USE_API_CMD=
SUBTITLE_CMD=
DAEMON_CMD=
NO_HISTORY_CMD=
QUANTIZED_CMD=
ASYNC_CONCURRENCY_CMD=
if [ "$USE_API" == 1 ]; then
USE_API_CMD="--use-api"
fi
if [ "$ASYNC_CONCURRENCY" == 1 ]; then
ASYNC_CONCURRENCY_CMD="--async-concurrency"
fi
Expand Down Expand Up @@ -81,6 +86,7 @@ DYLD_LIBRARY_PATH=`pwd`:/usr/local/lib:$DYLD_LIBRARY_PATH \
--llm-history-size $CONTEXT_SIZE \
--greeting "$GREETING" \
$SINGLE_CONCURRENCY_CMD \
$USE_API_CMD \
$SUBTITLE_CMD \
$DAEMON_CMD \
$CONTINUOUS_CMD \
Expand Down
2 changes: 1 addition & 1 deletion src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use clap::Parser;
#[derive(Parser, Debug, Clone)]
#[clap(
author = "Chris Kennedy",
version = "0.5.8",
version = "0.5.9",
about = "Rust AI Stream Analyzer Twitch Bot"
)]
pub struct Args {
Expand Down
Loading

0 comments on commit 37d5d94

Please sign in to comment.