Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
evoprompt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Grießhaber Daniel
evoprompt
Commits
7420ba00
Commit
7420ba00
authored
7 months ago
by
Grießhaber Daniel
Browse files
Options
Downloads
Patches
Plain Diff
make OpenAI.build_model_input return all arguments as dict
parent
b47cdc45
No related branches found
Branches containing commit
No related tags found
2 merge requests
!2
remove is_chat argument
,
!1
Refactor models
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
evoprompt/models.py
+13
-2
13 additions, 2 deletions
evoprompt/models.py
with
13 additions
and
2 deletions
evoprompt/models.py
+
13
−
2
View file @
7420ba00
...
...
@@ -328,8 +328,19 @@ class OpenAI(LLMModel):
usage
=
ModelUsage
(
**
response
.
usage
.
__dict__
)
return
response_text
,
usage
def
build_model_input
(
self
,
**
kwargs
):
return
kwargs
def
build_model_input
(
self
,
prompt
:
str
,
system_message
:
str
|
None
,
messages
:
list
[
dict
[
str
,
str
]],
history
:
list
[
dict
[
str
,
str
]]
|
None
=
None
,
):
return
{
"
prompt
"
:
prompt
,
"
system_message
"
:
system_message
,
"
messages
"
:
messages
,
"
history
"
:
history
,
}
@classmethod
def
register_arguments
(
cls
,
parser
:
ArgumentParser
):
...
...
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