diff --git a/gpt3discord.py b/gpt3discord.py index d259378..2898084 100644 --- a/gpt3discord.py +++ b/gpt3discord.py @@ -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") diff --git a/models/autocomplete_model.py b/models/autocomplete_model.py index f007862..b78dbeb 100644 --- a/models/autocomplete_model.py +++ b/models/autocomplete_model.py @@ -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 []