Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Llama Index
Commits
b6e33d45
Unverified
Commit
b6e33d45
authored
1 year ago
by
Anoop Sharma
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
corrected import (#10704)
parent
a86f77c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llama-index-core/llama_index/core/prompts/base.py
+4
-4
4 additions, 4 deletions
llama-index-core/llama_index/core/prompts/base.py
with
4 additions
and
4 deletions
llama-index-core/llama_index/core/prompts/base.py
+
4
−
4
View file @
b6e33d45
...
@@ -451,7 +451,7 @@ class LangchainPromptTemplate(BasePromptTemplate):
...
@@ -451,7 +451,7 @@ class LangchainPromptTemplate(BasePromptTemplate):
def
format
(
self
,
llm
:
Optional
[
BaseLLM
]
=
None
,
**
kwargs
:
Any
)
->
str
:
def
format
(
self
,
llm
:
Optional
[
BaseLLM
]
=
None
,
**
kwargs
:
Any
)
->
str
:
"""
Format the prompt into a string.
"""
"""
Format the prompt into a string.
"""
from
llama_index.
core.
llms.langchain
import
LangChainLLM
from
llama_index.llms.langchain
import
LangChainLLM
if
llm
is
not
None
:
if
llm
is
not
None
:
# if llamaindex LLM is provided, and we require a langchain LLM,
# if llamaindex LLM is provided, and we require a langchain LLM,
...
@@ -474,8 +474,8 @@ class LangchainPromptTemplate(BasePromptTemplate):
...
@@ -474,8 +474,8 @@ class LangchainPromptTemplate(BasePromptTemplate):
self
,
llm
:
Optional
[
BaseLLM
]
=
None
,
**
kwargs
:
Any
self
,
llm
:
Optional
[
BaseLLM
]
=
None
,
**
kwargs
:
Any
)
->
List
[
ChatMessage
]:
)
->
List
[
ChatMessage
]:
"""
Format the prompt into a list of chat messages.
"""
"""
Format the prompt into a list of chat messages.
"""
from
llama_index.
core.
llms.langchain
import
LangChainLLM
from
llama_index.llms.langchain
import
LangChainLLM
from
llama_index.
core.
llms.langchain
_
utils
import
from_lc_messages
from
llama_index.llms.langchain
.
utils
import
from_lc_messages
if
llm
is
not
None
:
if
llm
is
not
None
:
# if llamaindex LLM is provided, and we require a langchain LLM,
# if llamaindex LLM is provided, and we require a langchain LLM,
...
@@ -497,7 +497,7 @@ class LangchainPromptTemplate(BasePromptTemplate):
...
@@ -497,7 +497,7 @@ class LangchainPromptTemplate(BasePromptTemplate):
return
from_lc_messages
(
lc_messages
)
return
from_lc_messages
(
lc_messages
)
def
get_template
(
self
,
llm
:
Optional
[
BaseLLM
]
=
None
)
->
str
:
def
get_template
(
self
,
llm
:
Optional
[
BaseLLM
]
=
None
)
->
str
:
from
llama_index.
core.
llms.langchain
import
LangChainLLM
from
llama_index.llms.langchain
import
LangChainLLM
if
llm
is
not
None
:
if
llm
is
not
None
:
# if llamaindex LLM is provided, and we require a langchain LLM,
# if llamaindex LLM is provided, and we require a langchain LLM,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment