Skip to content

[Bug]: Crash #459

@kishanios123

Description

@kishanios123

Current Behavior

response = openai.ChatCompletion.create(model="gpt-3.5-turbo",temperature = 1.0,  # Change temperature here

File "/root/anaconda3/envs/openai/lib/python3.9/site-packages/gptcache/adapter/openai.py", line 100, in create
return adapt(
File "/root/anaconda3/envs/openai/lib/python3.9/site-packages/gptcache/adapter/adapter.py", line 172, in adapt
return_message = time_cal(
File "/root/anaconda3/envs/openai/lib/python3.9/site-packages/gptcache/utils/time.py", line 9, in inner
res = func(*args, **kwargs)
File "/root/anaconda3/envs/openai/lib/python3.9/site-packages/gptcache/adapter/adapter.py", line 161, in post_process
return_message = chat_cache.post_process_messages_func(
File "/root/anaconda3/envs/openai/lib/python3.9/site-packages/gptcache/processor/post.py", line 84, in temperature_softmax
scores = softmax([x / temperature for x in scores])
File "/root/anaconda3/envs/openai/lib/python3.9/site-packages/gptcache/utils/softmax.py", line 5, in softmax
x = np.array(x)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.

Expected Behavior

No response

Steps To Reproduce

No response

Environment

GPTCache==0.1.32

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions