Comments (1)
Model:
llama3
LangchaingoVersion:v0.1.10
I was trying to use the
llms.WithMaxLength
andllms.WithMinLength
to set some output limits, but seems like the model doesn't respect these options.callOptions = append(callOptions, llms.WithMaxLength(50), llms.WithMinLength(10))then I run the model as the following:
contentResponse, err = o.Llm.GenerateContent(ctx, content, callOptions...) .. for _, choice := range contentResponse.Choices { output += choice.Content errors += choice.StopReason } ..But I have responses with lengths higher than the one that I set, I don't know if this is a bug or if I am using the wrong option.
Also noticed that if I use
WithMaxTokens(2)
it works, but it feels like the model is just cutting off its response since I askedprompt: "Man is naturally evil or is corrupted by society?"
And the model gave me:
output: "A Classic"
but the problem is, if I increase the
MaxTokens
value, I get:output: "A classic debate!\n\nThe idea that man is corrupted by society, also known as the "social corruption" or "societal influence" theory, suggests that human nature is inherently good and that societal factors, such as culture, norms, and institutions"
ollama haven't supporte to WithMaxLength, only WithMaxTokens
from langchaingo.
Related Issues (20)
- add fastembed-go
- Langchaingo can't handle latest embedding models HOT 1
- `memory.ConversationTokenBuffer` apparently doesn't consider the llm type to count tokens
- Ollama Package: Not handling context timeout issues on streaming response. HOT 2
- Azure openAI models
- docker-compose fails in pgvector-vectorstore-example with "The Compose file is invalid" error HOT 1
- [Improvement] TextSplitter: return chunk start and end position
- Unable to send BinaryPart to OpenAI Completions API
- Only the first tool is recognized
- Langchainjs formally supports Ollama functions. Can you support that too? HOT 7
- anthropic: add means to supply anthropic-beta header
- bug: SimilaritySearch with scoreThrehold not works with PgVector. HOT 2
- Support OpenAI structured outputs API HOT 1
- Provide supported model
- Custom multi-input tools HOT 3
- Suggestion: Refactoring LLMs Option Handling for Improved Clarity and Consistency
- [Improvement] Qdrant Store should allow the user to specify the wait condition when adding documents HOT 1
- Anthropic does not handle null content elegantly (panics)
- openai: use ollama in test
- The endpoints of gpt-3.5-turbo-instruct model are different. 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 langchaingo.