mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
(test) promptlayer logger
This commit is contained in:
parent
5bf42d9be8
commit
82e93db774
1 changed files with 4 additions and 3 deletions
|
@ -46,12 +46,13 @@ def test_promptlayer_logging_with_metadata():
|
||||||
old_stdout = sys.stdout
|
old_stdout = sys.stdout
|
||||||
sys.stdout = new_stdout = io.StringIO()
|
sys.stdout = new_stdout = io.StringIO()
|
||||||
|
|
||||||
|
response = completion(model="gpt-3.5-turbo",
|
||||||
response = completion(model="j2-light",
|
|
||||||
messages=[{
|
messages=[{
|
||||||
"role": "user",
|
"role": "user",
|
||||||
"content": "Hi 👋 - i'm ai21"
|
"content": "Hi 👋 - i'm ai21"
|
||||||
}],
|
}],
|
||||||
|
temperature=0.2,
|
||||||
|
max_tokens=20,
|
||||||
metadata={"model": "ai21"})
|
metadata={"model": "ai21"})
|
||||||
|
|
||||||
# Restore stdout
|
# Restore stdout
|
||||||
|
@ -65,7 +66,7 @@ def test_promptlayer_logging_with_metadata():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
# test_promptlayer_logging_with_metadata()
|
test_promptlayer_logging_with_metadata()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue