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

TextSynth streaming support #1922

Merged
merged 5 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix gpt-3.5-turbo-instruct
  • Loading branch information
spolu committed Oct 3, 2023
commit f4568009832c644f6b569574faba9baee166e833
8 changes: 6 additions & 2 deletions core/src/blocks/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,12 @@ impl Block for LLM {
_ => Some(json!(extras_map)),
};

// if model_id starts with gpt-3.5-turbo or gpt-4 use the chat interface
match model_id.starts_with("gpt-3.5-turbo") || model_id.starts_with("gpt-4") {
// if model_id starts with gpt-3.5-turbo or gpt-4 use the chat interface (except for
// gpt-3.5-turbo-instruc)
spolu marked this conversation as resolved.
Show resolved Hide resolved
match (model_id.starts_with("gpt-3.5-turbo")
&& !model_id.starts_with("gpt-3.5-turbo-instruct"))
|| model_id.starts_with("gpt-4")
{
true => {
let prompt = self.prompt(env)?;
let messages = vec![ChatMessage {
Expand Down