mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
9d32af72ce
- **Description:** Some text-generation models on huggingface repeat the prompt in their generated response, but not all do! The tests use "gpt2" which DOES repeat the prompt and as such, the HuggingFaceHub class is hardcoded to remove the first few characters of the response (to match the len(prompt)). However, if you are using a model (such as the very popular "meta-llama/Llama-2-7b-chat-hf") that DOES NOT repeat the prompt in it's generated text, then the beginning of the generated text will be cut off. This code change fixes that bug by first checking whether the prompt is repeated in the generated response and removing it conditionally. - **Issue:** #16232 - **Dependencies:** N/A - **Twitter handle:** N/A |
||
---|---|---|
.. | ||
grammars | ||
__init__.py | ||
ai21.py | ||
aleph_alpha.py | ||
amazon_api_gateway.py | ||
anthropic.py | ||
anyscale.py | ||
aphrodite.py | ||
arcee.py | ||
aviary.py | ||
azureml_endpoint.py | ||
baidu_qianfan_endpoint.py | ||
bananadev.py | ||
baseten.py | ||
beam.py | ||
bedrock.py | ||
bittensor.py | ||
cerebriumai.py | ||
chatglm.py | ||
clarifai.py | ||
cloudflare_workersai.py | ||
cohere.py | ||
ctransformers.py | ||
ctranslate2.py | ||
databricks.py | ||
deepinfra.py | ||
deepsparse.py | ||
edenai.py | ||
fake.py | ||
fireworks.py | ||
forefrontai.py | ||
gigachat.py | ||
google_palm.py | ||
gooseai.py | ||
gpt4all.py | ||
gradient_ai.py | ||
huggingface_endpoint.py | ||
huggingface_hub.py | ||
huggingface_pipeline.py | ||
huggingface_text_gen_inference.py | ||
human.py | ||
javelin_ai_gateway.py | ||
koboldai.py | ||
llamacpp.py | ||
loading.py | ||
manifest.py | ||
minimax.py | ||
mlflow_ai_gateway.py | ||
mlflow.py | ||
modal.py | ||
mosaicml.py | ||
nlpcloud.py | ||
oci_data_science_model_deployment_endpoint.py | ||
octoai_endpoint.py | ||
ollama.py | ||
opaqueprompts.py | ||
openai.py | ||
openllm.py | ||
openlm.py | ||
pai_eas_endpoint.py | ||
petals.py | ||
pipelineai.py | ||
predibase.py | ||
predictionguard.py | ||
promptlayer_openai.py | ||
replicate.py | ||
rwkv.py | ||
sagemaker_endpoint.py | ||
self_hosted_hugging_face.py | ||
self_hosted.py | ||
stochasticai.py | ||
symblai_nebula.py | ||
textgen.py | ||
titan_takeoff_pro.py | ||
titan_takeoff.py | ||
together.py | ||
tongyi.py | ||
utils.py | ||
vertexai.py | ||
vllm.py | ||
volcengine_maas.py | ||
watsonxllm.py | ||
writer.py | ||
xinference.py | ||
yandex.py |