Skip to content

Commit

Permalink
Readd Mixtral via Fireworks (langchain-ai#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 authored Jan 25, 2024
1 parent bdfaccf commit 8f0efda
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 5 deletions.
9 changes: 8 additions & 1 deletion chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import weaviate
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from langchain_community.chat_models import ChatAnthropic
from langchain_community.chat_models.anthropic import ChatAnthropic
from langchain_community.chat_models.fireworks import ChatFireworks
from langchain_community.embeddings.voyageai import VoyageEmbeddings
from langchain_community.vectorstores.weaviate import Weaviate
from langchain_core.documents import Document
Expand Down Expand Up @@ -213,6 +214,12 @@ def create_chain(
temperature=0,
anthropic_api_key=os.environ.get("ANTHROPIC_API_KEY", "not_provided"),
),
fireworks_mixtral=ChatFireworks(
model="accounts/fireworks/models/mixtral-8x7b-instruct",
temperature=0,
max_tokens=16384,
fireworks_api_key=os.environ.get("FIREWORKS_API_KEY", "not_provided"),
),
google_gemini_pro=ChatGoogleGenerativeAI(
model="gemini-pro",
temperature=0,
Expand Down
6 changes: 3 additions & 3 deletions chat-langchain/app/components/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ export function ChatWindow(props: { conversationId: string }) {
>
<option value="openai_gpt_3_5_turbo">GPT-3.5-Turbo</option>
<option value="anthropic_claude_2_1">Claude-2.1</option>
{/* <option value="fireworks_mixtral">
Mixtral (via Fireworks.ai)
</option> */}
<option value="google_gemini_pro">Google Gemini Pro</option>
<option value="fireworks_mixtral">
Mixtral (via Fireworks.ai)
</option>
</Select>
</div>
</div>
Expand Down
30 changes: 29 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ langchain-community = "^0.0.14"
langchain-openai = "^0.0.3"
langchain-google-genai = "^0.0.6"
langchain-core = "0.1.15rc1"
fireworks-ai = "^0.11.2"


[tool.poetry.group.dev.dependencies]
Expand Down

0 comments on commit 8f0efda

Please sign in to comment.