Format Python code with psf/black push

github-actions 2 years ago
parent 413c1ae921
commit ead677d558

@ -40,7 +40,12 @@ if PINECONE_TOKEN:
PINECONE_INDEX = "conversation-embeddings"
if PINECONE_INDEX not in pinecone.list_indexes():
print("Creating pinecone index. Please wait...")
pinecone.create_index('conversation-embeddings', dimension=1536, metric='dotproduct', pod_type='s1')
pinecone.create_index(
"conversation-embeddings",
dimension=1536,
metric="dotproduct",
pod_type="s1",
)
pinecone_service = PineconeService(pinecone.Index(PINECONE_INDEX))
print("Got the pinecone service")

@ -41,7 +41,11 @@ class Settings_autocompleter:
"summarize_threshold": [str(num) for num in range(800, 3500, 50)],
}
if ctx.options["parameter"] in values.keys():
return [value for value in values[ctx.options["parameter"]] if value.startswith(ctx.value.lower())]
return [
value
for value in values[ctx.options["parameter"]]
if value.startswith(ctx.value.lower())
]
else:
await ctx.interaction.response.defer() # defer so the autocomplete in int values doesn't error but rather just says not found
return []

Loading…
Cancel
Save