Comments (7)
@MightEnlightenYou thanks for the bug! Its now fixed as #141 merged
from flowise.
Thanks :)
from flowise.
We recently just merged the integration using https://github.com/go-skynet/LocalAI
from flowise.
Oh, awesome, any guide on how to use it? or just install LocalAI and then there is a node to connect to it?
Or maybe it's just part of Flowise? :)
Thanks!
from flowise.
You'll need to have a Docker container running LocalAI. I'd suggest follow the quick guide here - https://github.com/go-skynet/LocalAI#example-use-gpt4all-j-model
Once you have that running, you can add the LocalAI node on Flowise, and fill in the url and model name. You can refer to the video attached in the PR - #123
from flowise.
Hey @HenryHengZJ
So I've tried to replace the ChatOpenAI with the ChatLocalAI chat model in the AutoGPT template but it didn't work since I can't connect the output from the local wrapper to the Chat Model input in the AutoGPT wrapper.
I gave ChatGPT the code (since I'm not a dev) for both wrappers (Local and OpenAI) and asked it to compare them, here's what it said.
Upon a quick review of your code, it seems there might be a mistake in how you're initializing your model in the ChatLocalAI_ChatModels class.
In the ChatOpenAI_ChatModels class, the model instance is initialized with an object that has a type of OpenAIChatInput, which matches the model type ChatOpenAI.
However, in the ChatLocalAI_ChatModels class, you're initializing an OpenAIChat model, but you're still passing it an OpenAIChatInput type object.
Considering that you're using a different model (OpenAIChat), it's likely that the input parameters required are different from those required by the ChatOpenAI model, hence the confusion.
Here is the problematic code:
javascript
Copy code
const obj: Partial & { openAIApiKey?: string } = {
temperature: parseInt(temperature, 10),
modelName,
openAIApiKey: 'sk-'
}
const model = new OpenAIChat(obj, { basePath })
It seems like you've used the same object structure as the OpenAIChatInput in the ChatOpenAI_ChatModels class, while the model you're initializing expects a different structure.
You may need to adjust this to suit the OpenAIChat model's requirements. If you're unsure what these are, it would be worth checking the documentation for the OpenAIChat model or even its source code if it's available.
It's also possible that the OpenAIChat doesn't expect or require the openAIApiKey property, given that this model is for local LLMs, which probably don't require an API key for OpenAI.
You also need to check if the imported OpenAIChat from 'langchain/llms/openai' is the correct class. The second wrapper seems to be for a local model, yet it's importing a class that seems to be related to OpenAI's models.
Please verify these assumptions by checking the OpenAIChat and OpenAIChatInput class definitions, to ensure they match the expected input properties and that the correct class is being instantiated.
from flowise.
@HenryHengZJ Thanks for fixing it!
from flowise.
Related Issues (20)
- [BUG] Langfuse incomplete trace when prompt chaining HOT 1
- Integrate GraphQAChain to flowise
- [BUG] Qdrant didn't follow metadata search filter HOT 2
- [BUG] Status: 500 Error: assistantsService.createAssistant HOT 2
- [BUG] Upstash memory key TTL dosen't change even though Session Timeouts is set in the Upstash node
- [BUG] Flowise API is really slow. Between 16 and 28 seconds HOT 1
- [QUESTION] Connect two llm chains to a chain tool
- [QUESTION] Can I use the flowise flow ui in vue project? HOT 1
- [FEATURE] Support for Portkey-AI/gateway API Endpoint Configuration in Flowise
- [FEATURE] Support for Reciprocal Rank Fusion Retriever with Azure OpenAI's GPT-3.5 Turbo Instruct in Flowise HOT 2
- HTTP error when using Mistral models HOT 1
- Generic custom bot and custom context at runtime
- Together AI HOT 1
- [BUG] ChatGoogleVertexAI response with [object Object]
- Custom tool leads with Haiku, Sonnet HOT 1
- [BUG] TypeError: Cannot read properties of undefined (reading 'filePath') HOT 1
- Rate_Limit_Bug HOT 1
- When Conversational Agent connects to ChatOpenAI, an error occurs when calling the tool.[BUG]
- [FEATURE] ChatOllama Function HOT 2
- [FEATURE] expose a DELETE method in upsert URL to remove records from record manager HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowise.